The upcoming Manifest V3 changes include restrictions on header modifications as quoted below:
Header Modification
The extensions
team recently added support for a new DNR action called removeHeaders
which can remove allowlisted headers from requests. This allowlist
currently includes Referer, Cookie, and Set-Cookie headers. We welcome
feedback from developers on other headers that should be removable.
Removing headers from a request should neither reduce the security of
sites (e.g. CSP) nor expose user data.
The
extensions team is also planning to add support for static header
additions and replacements. Additions would add new headers or extend
existing headers. For example, an extension could add additional
restrictions to CSP rules or add a new Set-Cookie header. Replacements
would behave similar to the removeHeaders action, but rather than
removing matching header(s) it would replace the header(s) with the
header(s) specified in the rule's action. Again, we welcome developer
feedback on this plan.
I'd like to see further clarification on "an extension could add additional
restrictions to CSP rules". Which CSP directives does this apply to? An exhaustive list would be appreciated.