From 3c2384bd098cf2b06429de9d2a49c664855f4ec7 Mon Sep 17 00:00:00 2001 From: JustOff Date: Fri, 18 Feb 2022 21:05:52 +0200 Subject: Fix CSP error at 0xacab.org (GitLab) Related discussion: - https://github.com/JustOff/github-wc-polyfill/issues/37#issuecomment-986105689 --- bootstrap.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap.js b/bootstrap.js index 8ab0c02..07ed02a 100644 --- a/bootstrap.js +++ b/bootstrap.js @@ -201,7 +201,9 @@ var httpObserver = { try { let csp = subject.getResponseHeader("Content-Security-Policy"); if (gitlab.test(subject.URI.host)) { - csp = csp.replace(/script-src /g, "script-src " + hashCElements + " "); + if (subject.URI.host != "0xacab.org") { + csp = csp.replace(/script-src /g, "script-src " + hashCElements + " "); + } } else { csp = csp.replace(/script-src /g, "script-src " + hashBase + " "); if (isSeaMonkey) { -- cgit v1.2.3