matchers: Clarify header matcher syntax

This commit is contained in:
Matthew Holt 2024-10-30 14:07:56 -06:00
parent f2cb7fef46
commit 63dfe5529a
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -397,7 +397,7 @@ Some more examples using [CEL expressions](#expression). Keep in mind that place
### header ### header
```caddy-d ```caddy-d
header <field> [<value>] header <field> [<value> ...]
expression header({'<field>': '<value>'}) expression header({'<field>': '<value>'})
``` ```
@ -406,7 +406,7 @@ By request header fields.
- `<field>` is the name of the HTTP header field to check. - `<field>` is the name of the HTTP header field to check.
- If prefixed with `!`, the field must not exist to match (omit value arg). - If prefixed with `!`, the field must not exist to match (omit value arg).
- `<value>` is the value the field must have to match. - `<value>` is the value the field must have to match. One or more may be specified.
- If prefixed with `*`, it performs a fast suffix match (appears at the end). - If prefixed with `*`, it performs a fast suffix match (appears at the end).
- If suffixed with `*`, it performs a fast prefix match (appears at the start). - If suffixed with `*`, it performs a fast prefix match (appears at the start).
- If enclosed by `*`, it performs a fast substring match (appears anywhere). - If enclosed by `*`, it performs a fast substring match (appears anywhere).