feat: bypass CSP by setting extra HTTP headers for page context

This commit is contained in:
karishmas6
2024-08-02 13:10:26 +05:30
parent 92bb30d8b7
commit 12e40f089d

View File

@@ -451,6 +451,11 @@ export default class Interpreter extends EventEmitter {
// page.context().addInitScript({ path: path.join(__dirname, 'browserSide', 'scraper.js') });
// }
// Enable CSP bypass for the page
await page.context().setExtraHTTPHeaders({
'Content-Security-Policy': ''
});
this.stopper = () => {
this.stopper = null;
};