Set-Cookie headers mark the moments where servers hand state back to the client: logins, consent flows, tracker drops, and more. The hasSetCookieOnResponseFilter gives you a precise hook on those moments so you can tag, strip, or audit cookies as soon as they are issued, without scanning the whole capture by hand.
Reach for hasSetCookieOnResponseFilter when a rule should trigger on responses that issue a cookie. You can match any Set-Cookie header by leaving the name empty, narrow to a specific cookie name, and further refine by value with exact, contains, startsWith, endsWith, or regex operations.
Practical uses:
Mark every response that sets a session cookie so you can pinpoint authentication boundaries in the capture.
rules:
- filter:
typeKind: HasSetCookieOnResponseFilter
name: SESSIONID
pattern: ''
operation: Regex
actions:
- typeKind: ApplyTagAction
tag:
value: session-issued
Remove a known tracker cookie before it reaches the client.
rules:
- filter:
typeKind: HasSetCookieOnResponseFilter
name: _ga
pattern: ''
operation: Regex
actions:
- typeKind: RemoveResponseCookieAction
name: _ga
Leave the name empty to match any Set-Cookie header, useful for auditing a session for unexpected cookie issuance.
rules:
- filter:
typeKind: HasSetCookieOnResponseFilter
name: ''
pattern: ''
operation: Regex
actions:
- typeKind: AddResponseHeaderAction
headerName: x-cookie-audit
headerValue: response-set-a-cookie
Search for a cookie value present in a set-cookie header response.If cookie name is not defined or empty, the filter will returns any cookie having the value.
Evaluation scope defines the timing where this filter will be applied.
responseHeaderReceivedFromRemote This scope occurs the moment fluxzy has done parsing the response header.
hasSetCookieOnResponseFilter
The following table describes the customizable properties available for this filter:
| Property | Type | Description | DefaultValue |
|---|---|---|---|
| name | string | Cookie name. Leave empty to match any cookies. This field is case sensitive | |
| pattern | string | The string pattern to search | |
| operation | exact | contains | startsWith | endsWith | regex | The search operation performed | contains |
| caseSensitive | boolean | true if the Search should be case sensitive | false |
| inverted | boolean | Negate the filter result | false |
This filter has no specific usage example
View definition of HasSetCookieOnResponseFilter for .NET integration.
The following filters are related to this filter:
Cookie names are case sensitive in the HTTP specification, so the filter mirrors that behavior to avoid false matches between two different cookies that share a casing variation.
Yes. Leave the name empty and provide a pattern with an operation other than empty regex. The filter then checks whether any Set-Cookie header in the response contains that value.
It is evaluated as soon as the response headers are parsed, so the filter fires before the body finishes streaming.