Do not add CSP headers to 304 requests

Fixes #577
This commit is contained in:
kkapsner 2021-09-09 17:40:18 +02:00
parent 2f6ca07bba
commit cca81c4006
1 changed files with 4 additions and 1 deletions

View File

@ -47,7 +47,10 @@
scope.init = function(){
function listener(details){
const headers = details.responseHeaders;
if (settings.get("blockDataURLs", new URL(details.url))){
if (
details.statusCode !== 304 &&
settings.get("blockDataURLs", new URL(details.url))
){
const cspMatch = (blockBlob? "": "blob: ") + "filesystem: *";
logging.verbose("Adding CSP header to", details);
setHeader(headers, {