mirror of
https://github.com/caddyserver/website.git
synced 2025-04-23 21:46:16 -04:00
Big Caddyfile docs update (#374)
This commit is contained in:
parent
3ec3033602
commit
22301d6a81
34 changed files with 1732 additions and 512 deletions
|
@ -55,10 +55,12 @@ encode [<matcher>] <formats...> {
|
|||
}
|
||||
```
|
||||
|
||||
|
||||
## Response matcher
|
||||
|
||||
**Response matchers** can be used to filter (or classify) responses by specific criteria.
|
||||
|
||||
|
||||
### status
|
||||
|
||||
```caddy-d
|
||||
|
@ -69,10 +71,12 @@ By HTTP status code.
|
|||
|
||||
- **<code...>** is a list of HTTP status codes. Special cases are `2xx`, `3xx`, ... which match against all status codes in the range of 200-299, 300-399, ... respectively
|
||||
|
||||
|
||||
### header
|
||||
|
||||
See the [header](/docs/caddyfile/matchers#header) request matcher for the supported syntax.
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
Enable Gzip compression:
|
||||
|
@ -86,3 +90,13 @@ Enable Zstandard and Gzip compression (with Zstandard implicitly preferred, sinc
|
|||
```caddy-d
|
||||
encode zstd gzip
|
||||
```
|
||||
|
||||
And in a full site, compressing static files served by [`file_server`](file_server):
|
||||
|
||||
```caddy
|
||||
example.com {
|
||||
root * /srv
|
||||
encode zstd gzip
|
||||
file_server
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue