From 8b130350ec211f4728e4c11845526e3100bb665d Mon Sep 17 00:00:00 2001 From: hackademix Date: Thu, 16 Apr 2020 19:53:18 +0200 Subject: Fixed SoundCloud login broken by NoScript being enabled. --- src/lib/SyncMessage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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'` -- cgit v1.2.3