duckduckgo / mv3-compat-tests

MIT License
5 stars 1 forks source link

`declarativeNetRequestWithHostAccess` permission is needed for `modifyHeaders` and `redirect` #1

Open xeenon opened 1 year ago

xeenon commented 1 year ago

Regarding FB12074754 and FB12074747, a change was made to align with Chrome that requires the declarativeNetRequestWithHostAccess permission for redirect and modifyHeaders dNR actions.

https://github.com/sammacbeth/mv3-compat-tests/blob/367cf7dbe15b201fc8d4a5f5850f867819f8a28c/Shared%20(Extension)/Resources/manifest.json#L40-L45

xeenon commented 1 year ago

@sammacbeth

sammacbeth commented 1 year ago

Thanks for this @xeenon. I added the declarativeNetRequestWithHostAccess to the manifest and now those issues are mostly resolved (addOrReplaceParams does not seem to work though).

I'm not sure this behavior is entirely aligned with Chrome, as the original manifest permissions were sufficient for redirect and modifyHeaders DNR rules. Perhaps, declarativeNetRequest permission and <all_urls> host permissions is sufficient, and the additional declarativeNetRequestWithHostAccess is considered redundant in this case. I'll check if that is the case, then raise a WECG issue to document the inconsistency.