diff options
author | Alessio Vanni <vannilla@firemail.cc> | 2019-07-19 16:11:45 +0200 |
---|---|---|
committer | Alessio Vanni <vannilla@firemail.cc> | 2019-07-19 16:11:45 +0200 |
commit | 1ec6e70fc1df5f804f8ec254055fce3775123785 (patch) | |
tree | 03910671df22785ea18be4415eb6c14d8553d329 /js/traffic.js | |
parent | a835d88e7fb3b5f01614985958bc68dd7f9e78cc (diff) | |
parent | acd097e4733c106a15815c90e21c00d0c545e042 (diff) | |
download | ematrix-1ec6e70fc1df5f804f8ec254055fce3775123785.tar.lz ematrix-1ec6e70fc1df5f804f8ec254055fce3775123785.tar.xz ematrix-1ec6e70fc1df5f804f8ec254055fce3775123785.zip |
Merge branch 'rewrite-vapi'
Diffstat (limited to 'js/traffic.js')
-rw-r--r-- | js/traffic.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/traffic.js b/js/traffic.js index b9efa4b..80af782 100644 --- a/js/traffic.js +++ b/js/traffic.js @@ -366,12 +366,12 @@ var onHeadersReceived = function(details) { /******************************************************************************/ var cspNoWorkerInit = function() { - if ( vAPI.webextFlavor === undefined ) { - return "child-src 'none'; frame-src data: blob: *; report-uri about:blank"; + if (ηMatrix.cspNoWorker === undefined) { + ηMatrix.cspNoWorker = "worker-src 'none'; " + +"frame-src data: blob: *; " + +"report-uri about:blank"; } - ηMatrix.cspNoWorker = /^Mozilla-Firefox-5[67]/.test(vAPI.webextFlavor) ? - "child-src 'none'; frame-src data: blob: *; report-uri about:blank" : - "worker-src 'none'; report-uri about:blank" ; + return ηMatrix.cspNoWorker; }; |