Safari web extension: DeclarativeNetRequest redirect rules

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,
  }
]})

i have same problem, regexSubstitution is necessary to monitor blocked/redirected urls.

Hi, any updates or workarounds on this issue? I'm still seeing the same problem as of 14.6

Safari web extension: DeclarativeNetRequest redirect rules
 
 
Q