1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Allow blob and filesystem schemes

They are protected and do not need to be blocked (like data-URLs).

Fixes #212 and fixes #213.
This commit is contained in:
kkapsner 2018-07-21 13:25:15 +02:00
parent eb1a441625
commit 8389165b70
3 changed files with 6 additions and 2 deletions

View file

@ -17,6 +17,7 @@
const settings = require("./settings");
scope.init = function(){
const cspMatch = "blob: filesystem: *";
browser.webRequest.onHeadersReceived.addListener(
function(details){
const headers = details.responseHeaders;
@ -24,7 +25,7 @@
logging.verbose("Adding CSP header to", details);
headers.push({
name: "Content-Security-Policy",
value: "object-src *; child-src *"
value: `object-src ${cspMatch}; frame-src ${cspMatch}; worker-src ${cspMatch}`
});
}
return {