Documentation Revamp
Co-authored-by: jbdoumenjou <jb.doumenjou@gmail.com>
This commit is contained in:
parent
848e45c22c
commit
ac6b11037d
174 changed files with 5858 additions and 4002 deletions
34
docs/content/middlewares/compress.md
Normal file
34
docs/content/middlewares/compress.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Compress
|
||||
|
||||
Compressing the Response before Sending it to the Client
|
||||
{: .subtitle }
|
||||
|
||||

|
||||
|
||||
The Compress middleware enables the gzip compression.
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
??? example "File -- enable gzip compression"
|
||||
|
||||
```toml
|
||||
[Middlewares]
|
||||
[Middlewares.test-compress.Compress]
|
||||
```
|
||||
|
||||
??? example "Docker -- enable gzip compression"
|
||||
|
||||
```yml
|
||||
a-container:
|
||||
image: a-container-image
|
||||
labels:
|
||||
- "traefik.middlewares.test-compress.compress=true",
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
Responses are compressed when:
|
||||
|
||||
* The response body is larger than `512` bytes.
|
||||
* The `Accept-Encoding` request header contains `gzip`.
|
||||
* The response is not already compressed, i.e. the `Content-Encoding` response header is not already set.
|
Loading…
Add table
Add a link
Reference in a new issue