Re:Manifest V3 now available on M88 Beta
by vbezhenar on Thursday December 10, 2020 @03:21AM
(#25371206)
You can modify headers and block requests.
[ Parent
| on HN ]
Great news, please share how.
Re:Manifest V3 now available on M88 Beta
by vbezhenar on Thursday December 10, 2020 @07:53AM
(#25373151)
https://developer.chrome.com/docs/extensions/reference/decla...
Snippet from rules.json:
{
"id": 1,
"priority": 1,
"action": { "type": "block" },
"condition": {"urlFilter": "google.com", "resourceTypes": ["main_frame"] }
},
{
"id": 11,
"priority": 1,
"action": {
"type": "modifyHeaders",
"responseHeaders": [
{ "header": "h1", "operation": "set", "value": "v4" },
{ "header": "h2", "operation": "append", "value": "v5" },
{ "header": "h3", "operation": "append", "value": "v6" }
]
},
"condition": { "urlFilter": "headers.com/12345", "resourceTypes": ["main_frame"] }
},Last time I looked Google position was:
"Regarding which headers will be allowed, we'll look at the feedback from devs and the current metrics and decide. In general, we want to take a closer look at the security implications of header modification."
tldr: CSP modification was strictly forbidden. Digging in further it seems this changed somewhere in 2020 and appears to be working now https://bugs.chromium.org/p/chromium/issues/detail?id=111648...