Merge branch 'local-upstream/master' into use-ToastXML

This commit is contained in:
Araxeus
2023-02-17 18:02:30 +02:00
17 changed files with 287 additions and 151 deletions

View File

@ -492,13 +492,12 @@ function removeContentSecurityPolicy(
// Custom listener to tweak the content security policy
session.webRequest.onHeadersReceived(function (details, callback) {
if (
!details.responseHeaders["content-security-policy-report-only"] &&
!details.responseHeaders["content-security-policy"]
)
return callback({ cancel: false });
details.responseHeaders ??= {}
// Remove the content security policy
delete details.responseHeaders["content-security-policy-report-only"];
delete details.responseHeaders["content-security-policy"];
callback({ cancel: false, responseHeaders: details.responseHeaders });
});