chrome.declarativeNetRequest.RuleActionType.MODIFY_HEADERS and responseHeaders
Opened this issue · 0 comments
Hi,
I have built the extension and tried to modify a response header to no avail. It works fine for requestHeaders.
Here is the rule:
{
id: 2,
priority: 1,
action: {
type: chrome.declarativeNetRequest.RuleActionType.MODIFY_HEADERS,
responseHeaders: [{
operation: chrome.declarativeNetRequest.HeaderOperation.SET,
header: "Access-Control-Allow-Origin:",
value: "*"
}]
},
condition: {
urlFilter: "|https://somesite.com^",
"resourceTypes": e
}
}
I have also tried other headers like X-Powered-By etc and the response headers are not modified.
I found on this Google Groups discussion:
https://groups.google.com/a/chromium.org/g/chromium-extensions/c/Sc-ssQsSj94
That it says that is a UI bug, but not sure if it is only a cosmetic bug when visualising it using Dev Tools network request response headers? Im wondering since the requestly extension actually works to modify it, why wouldnt this example work?
Thank you again!