> AFAICT, in #1 initiatorDomains applies to child requests made by the initiator, it doesn't include the request that creates the initiator itself.
You mean that the request to CSS styles is a request used to create the initiator, which is why it is not allowlisted? If that's the case, it is not clear why requests to stylesheets are blocked if I use `initiatorDomains` in the block rules, like this one (here is an example from the documentation:
https://developer.chrome.com/docs/extensions/reference/api/declarativeNetRequest#build-rules):
```javascript
const blockRule = {
id: 103,
priority: 2,
action: { type: "block" },
condition: {
initiatorDomains: ["
iana.org"],
resourceTypes: ["stylesheet"]
}
};
```
Additionally, the developer tools indicate that `
iana.org` is the initiator domain, which is confusing if it does not mean what it should:
> You can use requestDomains to list multiple domains if necessary.
This won't help if I want to allowlist all requests sent from one website only, since the extension wouldn't know all possible requests that could be made by the website.
It can be solved with `allow` like this:
```javascript
const allowRule = {
id: 102,
priority: 2,
action: { type: "allow" },
condition: {
initiatorDomains: ["
meduza.io"],
isUrlFilterCaseSensitive: false,
resourceTypes: ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "xmlhttprequest", "media", "other"]
}
};
const blockRule = {
id: 103,
priority: 2,
action: { type: "block" },
condition: {
urlFilter: "
polyfill.io",
isUrlFilterCaseSensitive: false,
}
};
```
In this case, requests to `
polyfill.io` sent from `
meduza.io` won't be blocked by the blocking rule. However, it is still unclear what the use case for allowAllRequests is.
Furthermore, the `allow` rule doesn't unblock the `main_frame` if it was blocked by `urlFilter`. To allowlist one website, we would need to add two declarative rules: one with `initiatorDomains` and another with `urlFilter` to unblock the `main_frame` only. This is strange, as I thought `allowAllRequests` was intended for this purpose.