chore: do not set bypassCSP when inspector is used (#19190)

Fixes https://github.com/microsoft/playwright/issues/19186
This commit is contained in:
Max Schmitt 2022-12-01 12:39:40 -08:00 committed by GitHub
parent b212e99dbb
commit 1d3feba578
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -612,8 +612,6 @@ export function validateBrowserContextOptions(options: channels.BrowserNewContex
throw new Error(`Browser needs to be launched with the global proxy. If all contexts override the proxy, global proxy will be never used and can be any string, for example "launch({ proxy: { server: 'http://per-context' } })"`); throw new Error(`Browser needs to be launched with the global proxy. If all contexts override the proxy, global proxy will be never used and can be any string, for example "launch({ proxy: { server: 'http://per-context' } })"`);
options.proxy = normalizeProxySettings(options.proxy); options.proxy = normalizeProxySettings(options.proxy);
} }
if (debugMode() === 'inspector')
options.bypassCSP = true;
verifyGeolocation(options.geolocation); verifyGeolocation(options.geolocation);
} }