summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhackademix2020-04-16 19:53:18 +0200
committerhackademix2020-04-16 19:53:18 +0200
commit8b130350ec211f4728e4c11845526e3100bb665d (patch)
treeb57bd343096a3084074aa3ad73312de72bdff395 /src
parentbb00cb8c8bfe7711dffb62bc0708d88b6d625224 (diff)
downloadnoscript-8b130350ec211f4728e4c11845526e3100bb665d.tar.gz
noscript-8b130350ec211f4728e4c11845526e3100bb665d.tar.xz
noscript-8b130350ec211f4728e4c11845526e3100bb665d.zip
Fixed SoundCloud login broken by NoScript being enabled.
Diffstat (limited to 'src')
-rw-r--r--src/lib/SyncMessage.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/SyncMessage.js b/src/lib/SyncMessage.js
index 98fe6cd..cc99396 100644
--- a/src/lib/SyncMessage.js
+++ b/src/lib/SyncMessage.js
@@ -124,8 +124,9 @@
let onHeaderReceived = request => {
let replaced = "";
let {responseHeaders} = request;
+ let rxFP = /^feature-policy$/i;
for (let h of request.responseHeaders) {
- if (h.name === "feature-policy") {
+ if (rxFP.test(h.name)) {
h.value = h.value.replace(/\b(sync-xhr\s+)([^*][^;]*)/g,
(all, m1, m2) => replaced =
`${m1}${m2.replace(/'none'/, '')} 'self'`