I am trying to write a URL-redirection safari web extension.
manifest.json
"declarative_net_request": {
"rule_resources": [
{
"id": "ruleset",
"enabled": true,
"path": "rules.json"
}
]
},
"permissions": [
"declarativeNetRequest",
"webNavigation"
]
}
Rules.json
[
{
"id": 1,
"priority": 1,
"action": {
"type": "redirect",
"redirect": {
"regexSubstitution": "https://example.com/"
}
},
"condition": {
"regexFilter": "http://*/",
"resourceTypes": [
"main_frame"
]
}
}
]
Expectation - any search should redirect to example.com
Getting this error Non-fatal issue: Rule with id 1 is invalid. redirect is not a supported action type.
The same code works fine in chrome as a chrome extension, giving error in safari browser only.
Is redirect not supported by safari? If no, what other options do i have to achieve it?