Fixed typo causing CSP-based media blocking to skip requests with no content-type header.
This commit is contained in:
parent
69f14bf23f
commit
6a07c055e0
|
@ -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.lentgh === 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.name));
|
||||
blocker = this.buildFromCapabilities(capabilities, blockHTTP);
|
||||
}
|
||||
let extras = [];
|
||||
|
|
Loading…
Reference in New Issue