Compress data on flush when compression is not started
Co-authored-by: Romain <rtribotte@users.noreply.github.com>
This commit is contained in:
parent
07e6491ace
commit
474ab23fe9
4 changed files with 185 additions and 79 deletions
|
@ -179,9 +179,15 @@ http:
|
|||
_Optional, Default=1024_
|
||||
|
||||
`minResponseBodyBytes` specifies the minimum amount of bytes a response body must have to be compressed.
|
||||
|
||||
Responses smaller than the specified values will not be compressed.
|
||||
|
||||
!!! tip "Streaming"
|
||||
|
||||
When data is sent to the client on flush, the `minResponseBodyBytes` configuration is ignored and the data is compressed.
|
||||
This is particularly the case when data is streamed to the client when using `Transfer-encoding: chunked` response.
|
||||
|
||||
When chunked data is sent to the client on flush, it will be compressed by default even if the received data has not reached
|
||||
|
||||
```yaml tab="Docker & Swarm"
|
||||
labels:
|
||||
- "traefik.http.middlewares.test-compress.compress.minresponsebodybytes=1200"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue