mirror of
https://github.com/caddyserver/website.git
synced 2025-04-22 21:16:15 -04:00
docs: Dynamically turn subdirectives into links to anchors (#190)
* docs: Dynamically turn subdirectives into links to anchors * Make entire rows clickable on directive page's table
This commit is contained in:
parent
3dac36ebc8
commit
c5e3aef0a2
8 changed files with 231 additions and 124 deletions
|
@ -2,6 +2,13 @@
|
|||
title: encode (Caddyfile directive)
|
||||
---
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
// We'll add links to all the subdirectives if a matching anchor tag is found on the page.
|
||||
addLinksToSubdirectives();
|
||||
});
|
||||
</script>
|
||||
|
||||
# encode
|
||||
|
||||
Encodes responses using the configured encoding(s). A typical use for encoding is compression.
|
||||
|
@ -27,10 +34,10 @@ encode [<matcher>] <formats...> {
|
|||
```
|
||||
|
||||
- **<formats...>** is the list of encoding formats to enable. If multiple encodings are enabled, the encoding is chosen based the request's Accept-Encoding header; if the client has no strong preference (q-factor), then the first supported encoding is used.
|
||||
- **gzip** enables Gzip compression, optionally at the specified level.
|
||||
- **zstd** enables Zstandard compression.
|
||||
- **minimum_length** the minimum number of bytes a response should have to be encoded (default: 512).
|
||||
- **match** is a [response matcher](#response-matcher). Only matching responses are encoded. The default looks like this:
|
||||
- **gzip** <span id="gzip"/> enables Gzip compression, optionally at the specified level.
|
||||
- **zstd** <span id="zstd"/> enables Zstandard compression.
|
||||
- **minimum_length** <span id="minimum_length"/> the minimum number of bytes a response should have to be encoded (default: 512).
|
||||
- **match** <span id="match"/> is a [response matcher](#response-matcher). Only matching responses are encoded. The default looks like this:
|
||||
|
||||
```caddy-d
|
||||
match {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue