From 6fcb68ba31f585cd278267d78baf73121369505f Mon Sep 17 00:00:00 2001 From: JustOff Date: Mon, 11 Oct 2021 13:41:57 +0300 Subject: Update CSP workaround for socket-worker script --- bootstrap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3