Scenario: Browser -> proxyurl.com -> target.com
Is it possible to modify the headers sent to the proxy?
It appears that the urlFilter
refers to the target.com
.
const removeRuleIds = [1];
const addRules = [
{
id: 1,
priority: 1,
action: {
type: 'modifyHeaders',
responseHeaders: [
{
header: 'header-1',
operation: 'set',
value: 'header1-added'
}
]
},
condition: {urlFilter: '||proxyurl.com' }
}
];
chrome.declarativeNetRequest.updateDynamicRules({removeRuleIds, addRules});