You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/general/ad-filtering/create-own-filters.md
+6-22Lines changed: 6 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -564,40 +564,24 @@ If you want the rule not to be applied to certain domains, start a domain name w
564
564
565
565
**`$domain` modifier matching target domain:**
566
566
567
-
In some cases the `$domain` modifier can match not only the referrer domain, but also the target domain. This happens when all the following conditions are met:
567
+
In some cases the `$domain` modifier can match not only the referrer domain, but also the target domain.
568
568
569
-
1. The request has the `document` content type
570
-
1. The rule pattern does not match any particular domains
571
-
1. The rule pattern does not contain regular expressions
572
-
1. The `$domain` modifier contains only excluded domains, e.g. `$domain=~example.org|~example.com`
569
+
This happens when the rule has one of the following modifiers: [`$cookie`](#cookie-modifier), [`$csp`](#csp-modifier), [`$permissions`](#permissions-modifier), [`$removeparam`](#removeparam-modifier).
573
570
574
-
The following predicate should be satisfied to perform a target domain matching:
575
-
576
-
```text
577
-
1 AND ((2 AND 3) OR 4)
578
-
```
579
-
580
-
That is, if the modifier `$domain` contains only excluded domains, then the rule does not need to meet the second and third conditions to match the target domain against the modifier `$domain`.
581
-
582
-
If some of the conditions above are not met but the rule contains [`$cookie`](#cookie-modifier) or [`$csp`](#csp-modifier) modifier, the target domain will still be matched.
583
-
584
-
If the referrer matches a rule with `$domain` that explicitly excludes the referrer domain, then the rule will not be applied even if the target domain also matches the rule. This affects rules with [`$cookie`](#cookie-modifier) and [`$csp`](#csp-modifier) modifiers, too.
571
+
These modifiers will not be applied if the referrer matches a rule with `$domain` that explicitly excludes the referrer domain, even if the target domain also matches the rule.
585
572
586
573
**Examples**
587
574
588
575
-`*$cookie,domain=example.org|example.com` will block cookies for all requests to and from `example.org` and `example.com`.
589
-
-`*$document,domain=example.org|example.com` will block all requests to and from `example.org` and `example.com`.
576
+
-`*$document,domain=example.org|example.com` will block requests only from `example.org` and `example.com`, but not to them.
590
577
591
578
In the following examples it is implied that requests are sent from `http://example.org/page` (the referrer) and the target URL is `http://targetdomain.com/page`.
592
579
593
580
-`page$domain=example.org` will be matched, as it matches the referrer domain.
594
-
-`page$domain=targetdomain.com` will be matched, as it matches the target domain and satisfies all requirements mentioned above.
595
-
-`||*page$domain=targetdomain.com` will not be matched, as the pattern `||*page` may match specific domains,
596
-
e.g. `example.page`.
581
+
-`page$domain=targetdomain.com` will not be matched because it does not match the referrer domain.
597
582
-`||*page$domain=targetdomain.com,cookie` will be matched because the rule contains `$cookie` modifier
598
583
despite the pattern `||*page` may match specific domains.
599
-
-`/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression.
600
-
-`page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded.
584
+
-`page$domain=targetdomain.com|~example.org,cookie` will not be matched because the referrer domain is explicitly excluded.
0 commit comments