summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustOff <Off.Just.Off@gmail.com>2021-10-11 13:41:57 +0300
committerJustOff <Off.Just.Off@gmail.com>2021-10-11 13:41:57 +0300
commit6fcb68ba31f585cd278267d78baf73121369505f (patch)
tree26e795a86c7f2adc10009e0d3a457ebc31f185fb
parent4e7ec35b695067e64606fadef8acb5c055728745 (diff)
downloadgithub-wc-polyfill-6fcb68ba31f585cd278267d78baf73121369505f.tar.gz
Update CSP workaround for socket-worker script
-rw-r--r--bootstrap.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/bootstrap.js b/bootstrap.js
index 2e8e5e0..df455b6 100644
--- a/bootstrap.js
+++ b/bootstrap.js
@@ -220,7 +220,7 @@ var httpObserver = {
let newListener = new tracingListener();
newListener.site = "gitlabjs";
newListener.originalListener = subject.setNewListener(newListener);
- } else if (subject.URI.path.indexOf("/socket-worker-") == 0) {
+ } else if (subject.URI.path.indexOf("/socket-worker-") != -1) {
let csp = subject.getResponseHeader("Content-Security-Policy");
csp = csp.replace(/worker-src /g, "worker-src github.githubassets.com ");
subject.setResponseHeader("Content-Security-Policy", csp, false);