browserContext.route('**', async (route, request) => {
await route.fulfill({
status: 200,
headers: {'set-cookie': 'cookie'}, // headers?: {[p: string]: string}
});
});
It is impossible to set several identical headers in the map, but cookies are set using multiple set-cookies headers.
NodeJS solves this problem like this: { [p: string]: string | string[] }
Could it be worth doing the same here too?