mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(Page): introduce Page.setBypassCSP (#2324)
This patch introduces `page.setBypassCSP` method that allows clients to ignore Content-Security-Policy for a given page. Fixes #1229.
This commit is contained in:
@@ -610,6 +610,13 @@ class Page extends EventEmitter {
|
||||
await this._client.send('Emulation.setScriptExecutionDisabled', { value: !enabled });
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {boolean} enabled
|
||||
*/
|
||||
async setBypassCSP(enabled) {
|
||||
await this._client.send('Page.setBypassCSP', { enabled });
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {?string} mediaType
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user