aboutsummaryrefslogtreecommitdiffstats
path: root/js/traffic.js
diff options
context:
space:
mode:
authorAlessio Vanni <vannilla@firemail.cc>2019-06-19 19:11:36 +0200
committerAlessio Vanni <vannilla@firemail.cc>2019-06-19 19:11:36 +0200
commit23f2978b8a41649c93f8b46c0f967f8b226928a4 (patch)
tree37dd01cb548522f466bf34880c5c31ab4a7bce10 /js/traffic.js
parent52603bc5bc8831d0ec0f901f1279871599f877d9 (diff)
downloadematrix-23f2978b8a41649c93f8b46c0f967f8b226928a4.tar.lz
ematrix-23f2978b8a41649c93f8b46c0f967f8b226928a4.tar.xz
ematrix-23f2978b8a41649c93f8b46c0f967f8b226928a4.zip
Don't use child-src
It generates an error in the browser console and it's rather annoying. There is still one error being generated, but it's unclear from where it comes from. Not yet tested in Basilisk.
Diffstat (limited to 'js/traffic.js')
-rw-r--r--js/traffic.js10
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;
};