diff --git a/src/docs/markdown/caddyfile/concepts.md b/src/docs/markdown/caddyfile/concepts.md index 47ca465..3575454 100644 --- a/src/docs/markdown/caddyfile/concepts.md +++ b/src/docs/markdown/caddyfile/concepts.md @@ -163,7 +163,7 @@ By default, a directive that injects an HTTP handler applies to all requests (un **Request matchers** can be used to classify requests by a given criteria. This concept originates in the [underlying JSON](/docs/json/apps/http/servers/routes/match/) structure, and it's important to know how to use them in the Caddyfile. With matchers, you can specify exactly which requests a directive applies to. -To limit a directive's scope, use a **matcher token** immediately after the directive. It can be one of these forms: +To limit a directive's scope, use a **matcher token** immediately after the directive, [if the directive supports matchers](/docs/caddyfile/directives#matchers). The matcher token can be one of these forms: 1. **`*`** to match all requests (wildcard; default). 2. **`/path`** start with a forward slash to match a request path. @@ -212,8 +212,8 @@ For example: ``` @websockets { - header_regexp Connection Upgrade - header Upgrade websocket + header Connection *Upgrade* + header Upgrade websocket } reverse_proxy @websockets localhost:6001 ``` diff --git a/src/docs/markdown/caddyfile/directives.md b/src/docs/markdown/caddyfile/directives.md index 3f52283..4ccf2e5 100644 --- a/src/docs/markdown/caddyfile/directives.md +++ b/src/docs/markdown/caddyfile/directives.md @@ -51,13 +51,15 @@ Subdirectives are always optional unless documented otherwise, even though they ### Matchers -Most directives accept [matcher tokens](/docs/caddyfile/concepts#matchers), and they are usually optional. You will often see this in a directive's syntax description: +Most---but not all---directives accept [matcher tokens](/docs/caddyfile/concepts#matchers), which let you filter requests. Matcher tokens are usually optional. If you see this in a directive's syntax: ``` [] ``` -When you see this in the syntax of a directive, it means a matcher token. Because this is the same with most directives, it will not be described on every page; this reduces duplication. Instead, refer to the centralized [matcher documentation](/docs/caddyfile/concepts#matchers). +then the directive accepts a matcher token, letting you filter which requests the directive applies to. + +Because matcher tokens all work the same, the various possibilities for the matcher token will not be described on every page, to reduce duplication. Instead, refer to the centralized [matcher documentation](/docs/caddyfile/concepts#matchers). ## Directive order