From e9b1533c9e02ebb1937184184cacdae1308a3ad9 Mon Sep 17 00:00:00 2001 From: MasterKia Date: Fri, 20 Oct 2023 11:42:34 +0330 Subject: [PATCH] Bring `header=` filter option out of experimental status --- Static-filter-syntax.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Static-filter-syntax.md b/Static-filter-syntax.md index 4da56f9..21d8a36 100644 --- a/Static-filter-syntax.md +++ b/Static-filter-syntax.md @@ -475,8 +475,6 @@ Generic cosmetic filters are hiding filters that apply to all pages - `##.ad-cla #### `header` -#### _Work in progress, syntax still experimental and under evaluation_ - New in [1.32.0](https://github.com/gorhill/uBlock/commit/bde3164eb445a4e74acca303ec9fa07f82ba1b1c). Advanced setting `filterOnHeaders` must be `true` (default to `false`) for this filter option to be valid in uBO. Ability to filter network **responses** according to whether a specific **response header** is present and whether or not it matches a distinct value. @@ -524,6 +522,17 @@ Where connection: - is of type `script`. - has a response HTTP header named `via` whose value matches `1.1 google`. + +Block requests whose responses have the `Set-Cookie` header with any value: +```adb +||example.com^$header=set-cookie +``` + +Unblock requests whose responses have the `Set-Cookie `header with value matching the `foo, bar$` regular expression: +```adb +@@||example.com^$header=set-cookie:/foo\, bar\$/ +``` + To remove response headers, see: [`Response header filtering`](#response-header-filtering). ***