1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-05-07 05:43:37 +12:00
5 How to have root documents blocked by default everywhere
Raymond Hill edited this page 2017-11-29 09:34:39 -05:00

By default, uMatrix does not prevent root documents from loading -- unless the domain itself is blacklisted. It would be quite impractical to block all root documents by default.

There is a built-in allow rule (* * doc allow) in uMatrix such that root documents are properly loaded even when there is a block rule on the all cell, and even if the current domain is not whitelisted (this will happen if you remove the * 1st-party * allow rule from your ruleset):

a
* 1st-party * allow was removed, root document still loaded fine.

If you want even root document to inherit the state of lower precedence cells, you will need to override the built-in allow rule for root document. To do so, you will have to add the following rule into your ruleset by manually editing through My rules pane in the dashboard:

* * doc inherit

If additionally you remove the * 1st-party * allow rule from your ruleset, then all root documents will become blocked by default (assuming the lower precedence all cell is blacklisted):

a

And you will have to explicitly create an allow rule for the root document to load:

a

I do not expect many users to work this way, but I document it here so that it hopefully answers questions about how root documents are handled in uMatrix.

Note that the built-in rule * * doc allow never appears in My rules, because of a history of users blanket-removing all rules and then opening an issue about uMatrix now blocking too much. The rule is now built-in and must be overridden with an explicit * * doc inherit in order for root documents to inherit their block/allow status from the all cell.