Behaviour of multiple DNR rules on same URL having same priority

131 views
Skip to first unread message

Nafees Nehar

unread,
Jun 7, 2024, 4:13:26 AM (11 days ago) Jun 7
to Chromium Extensions
Hi
When multiple DNR rules with same priority are matched with the same request, how the rules are applied is not consistent across different actions:
  1. If multiple redirect actions are used with same priority, the rules are applied arbitrarily as mentioned here.
  2. If multiple modifyHeaders are used with same priority then conflicts happen iff multiple rules modify the same header and are resolved as mentioned here.
  3. If multiple queryTransform are used with same priority on the same URL then it has been observed that only one of them is applied even if there is no conflict between the query string values. 
    eg: 1st rule adds param test1=1
    2nd rule adds param test2=2

    But only one of them applies.It happens when priority is same for the conflicting rules. I can use priority to control the outcome but I would like if the behaviour is like modifyHeaders where conflicts happens only when both the rules try to modify the same header and not if the URLs are in conflict.
The same behaviour was highlighted here as well. I do not see any harm if we allow multiple queryTransform to be applied on the same request URL or am I missing something?

Thanks. 
Nafees

Oliver Dunk

unread,
Jun 7, 2024, 6:28:49 AM (11 days ago) Jun 7
to Nafees Nehar, Chromium Extensions
Hi Nafees,

There is some discussion here on general workarounds and also interest in applying multiple rules in the future: https://github.com/w3c/webextensions/issues/468

We definitely agree it is a valid use case and want to support it.

If you're able to share any more about the specific URLs you're using and changes you want to make, we might be able to help with suggesting an approach.
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/d7edfce5-e179-43d3-869d-da221d599bd9n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages