From e0601542d24d8d2655b0a3550a051b3f48b47c74 Mon Sep 17 00:00:00 2001 From: Sam Meel Date: Tue, 12 Sep 2023 14:23:05 +0200 Subject: [PATCH 1/2] Disable CSP option --- lib/helper/Playwright.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index b1c8d032e..9f0baa655 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -482,6 +482,7 @@ class Playwright extends Helper { contextOptions.httpCredentials = this.options.basicAuth; this.isAuthenticated = true; } + if (this.options.disableCSP) contextOptions.disableCSP = this.options.disableCSP; if (this.options.recordVideo) contextOptions.recordVideo = this.options.recordVideo; if (this.storageState) contextOptions.storageState = this.storageState; if (this.options.userAgent) contextOptions.userAgent = this.options.userAgent; From 5f9706356bbeedf8c7c703f9a90601715f41b614 Mon Sep 17 00:00:00 2001 From: Sam Meel Date: Wed, 13 Sep 2023 11:29:23 +0200 Subject: [PATCH 2/2] add bypassCSP to playwright context --- lib/helper/Playwright.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index 9f0baa655..79c9feb42 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -482,7 +482,7 @@ class Playwright extends Helper { contextOptions.httpCredentials = this.options.basicAuth; this.isAuthenticated = true; } - if (this.options.disableCSP) contextOptions.disableCSP = this.options.disableCSP; + if (this.options.bypassCSP) contextOptions.bypassCSP = this.options.bypassCSP; if (this.options.recordVideo) contextOptions.recordVideo = this.options.recordVideo; if (this.storageState) contextOptions.storageState = this.storageState; if (this.options.userAgent) contextOptions.userAgent = this.options.userAgent;