summaryrefslogtreecommitdiff
path: root/src/bg
diff options
context:
space:
mode:
Diffstat (limited to 'src/bg')
-rw-r--r--src/bg/ReportingCSP.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bg/ReportingCSP.js b/src/bg/ReportingCSP.js
index 2da1bbc..e7ffe0a 100644
--- a/src/bg/ReportingCSP.js
+++ b/src/bg/ReportingCSP.js
@@ -35,11 +35,11 @@ function ReportingCSP(reportURI, reportGroup) {
h.name === REPORT_TO.name && h.value === REPORT_TO.value) {
needsReportTo = false;
} else if (blocker && /^(Location|Refresh)$/i.test(h.name)) {
+ // neutralize any HTTP redirection to data: URLs, like Chromium
let url = /^R/i.test(h.name)
? h.value.replace(/^[^,;]*[,;]url[^\w=]*=\s*/i, "") : h.value;
- let patched = CSP.patchDataURI(url, blocker);
- if (patched !== url) {
- h.value = h.value.slice(0, -url.length) + patched;
+ if (/^data:/i.test(url)) {
+ h.value = h.value.slice(0, -url.length) + "data:";
}
}
}