Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update compatibiltiy for $method modifier #204

Closed
wants to merge 6 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions docs/general/ad-filtering/create-own-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,16 +409,21 @@ This modifier defines a rule which applies only to addresses that match the case

#### **`$method`** {#method-modifier}

This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively.
This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator.

**Examples**

* `||evil.com^$method=get|head` blocks only GET and HEAD requests to `evil.com`.
* `||evil.com^$method=~post|~put` blocks any requests except POST or PUT to `evil.com`.
* `||evil.com^$method=~post|~put` blocks any requests to `evil.com`,except POST or PUT.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пробел после запятой

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+ лишний после any requests

* `@@||evil.com$method=get` unblocks only GET requests to `evil.com`.
* `@@||evil.com$method=~post` blocks any requests to `evil.com`, except POST.
stanislav-atr marked this conversation as resolved.
Show resolved Hide resolved

Please note, that rules with mixed value restriction are considered invalid. So, for example, the rule
`||evil.com^$method=get|~head` will be rejected.

> **Compatibility with different versions of AdGuard**
>
> `$method` is available starting with CoreLibs v1.12.
> Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting with v4.2 or v4.3?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ameshkov v4.2, but we were considering adding TSUrlFilter version here, in a similar fashion as CoreLibs


#### **`$popup`** {#popup-modifier}

Expand Down