Fixed regression: document media and font restrictions always cascaded (thanks BrainDedd for report).

This commit is contained in:
hackademix 2020-10-09 09:25:54 +02:00
parent 16f796fed8
commit 76ef8457ff
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ function ReportingCSP(marker, reportURI = "") {
let blocker;
if (capabilities) {
let contentType = responseHeaders.filter(h => h.name.toLowerCase() === "content-type");
let blockHTTP = contentType.length === 0 || contentType.some(h => !/^(?:text|application)\/\S*\b(?:x?ht|x)ml\b/i.test(h.name));
let blockHTTP = contentType.length === 0 || contentType.some(h => !/^(?:text|application)\/\S*\b(?:x?ht|x)ml\b/i.test(h.value));
blocker = this.buildFromCapabilities(capabilities, blockHTTP);
}
let extras = [];