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:
parent
eb1a441625
commit
8389165b70
3 changed files with 6 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue