Replies: 1 comment
-
For this, changing all the declarativeNetRequest modifyHeader rules on Content-Security-Policy to append rather than set means we see both the original server policy and the one we append in the onHeadersReceived listener. It also means we restrict the policy further than the server one rather than replace (which can make it less restrictive). That seems like a good thing anyway but Chrome doesn't support the append on Content-Security-Policy header so we still have a difference in behaviour between browsers. That leads me to questions on the current behaviour in Chrome:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
This is a really nice way to mostly reproduce uMatrix with mv3. It's also quite useful to debug the server side Content-Security-Policy.
I've started playing around with it in firefox.
Problems I've been able to solve:
I can make a PR to fix all these.
But there are more issues:
The webRequest.onHeadersReceived listener seems to get the headers after they have been changed by the declarativeNetRequest rules. That means we don't get the server suggested policy and we don't keep the directives that we don't manage in the UI. So far the only way around this I've seen is to use a blocking webRequest which maybe defeats the whole point of the extension?
There's also a rather alarming issue where adding or abandoning a session rule makes subsequent reloads of the tab completely bypass the rules set by the extension. Still trying to understand that.
Any thoughts on the above are welcome.
Beta Was this translation helpful? Give feedback.
All reactions