diff options
author | JustOff <Off.Just.Off@gmail.com> | 2022-02-18 21:05:52 +0200 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2022-02-18 21:05:52 +0200 |
commit | 3c2384bd098cf2b06429de9d2a49c664855f4ec7 (patch) | |
tree | 0042a3a09722ed78fc38082c8fba52d36cf6e8cd | |
parent | 7ef8c645e1226266c80f808fd5974dbaa9aa30c1 (diff) | |
download | github-wc-polyfill-3c2384bd098cf2b06429de9d2a49c664855f4ec7.tar.gz |
Fix CSP error at 0xacab.org (GitLab)
Related discussion:
- https://github.com/JustOff/github-wc-polyfill/issues/37#issuecomment-986105689
-rw-r--r-- | bootstrap.js | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |