When using DeclarativeNetrequest, I get an error that "regexSubstitution" is not a valid action type.
The full error message:
"`redirect` is missing either a `url`, `extensionPath`, or `transform` key"
Regex based conditions are supported, but regex substitution for the redirect action is not. Is this intended behaviour?
Note: I'm calling the API as
browser.declarativeNetRequest.updateDynamicRules({ addRules: [
{
action: {redirect: {regexSubstitution: "https://www.somesite.com/\\1"}, type: "redirect"},
condition: {regexFilter: ".*?://test/(.*?)", resourceTypes: ["main_frame"]},
priority: 1,
id: 1,
}
]})