Add support for Zstandard to the Compression middleware
This commit is contained in:
parent
3f48e6f8ef
commit
b795f128d7
7 changed files with 576 additions and 213 deletions
|
@ -10,7 +10,7 @@ Compress Allows Compressing Responses before Sending them to the Client
|
|||
|
||||

|
||||
|
||||
The Compress middleware supports gzip and Brotli compression.
|
||||
The Compress middleware supports Gzip, Brotli and Zstandard compression.
|
||||
The activation of compression, and the compression method choice rely (among other things) on the request's `Accept-Encoding` header.
|
||||
|
||||
## Configuration Examples
|
||||
|
@ -54,8 +54,8 @@ http:
|
|||
|
||||
Responses are compressed when the following criteria are all met:
|
||||
|
||||
* The `Accept-Encoding` request header contains `gzip`, `*`, and/or `br` with or without [quality values](https://developer.mozilla.org/en-US/docs/Glossary/Quality_values).
|
||||
If the `Accept-Encoding` request header is absent, the response won't be encoded.
|
||||
* The `Accept-Encoding` request header contains `gzip`, and/or `*`, and/or `br`, and/or `zstd` with or without [quality values](https://developer.mozilla.org/en-US/docs/Glossary/Quality_values).
|
||||
If the `Accept-Encoding` request header is absent and no [defaultEncoding](#defaultencoding) is configured, the response won't be encoded.
|
||||
If it is present, but its value is the empty string, then compression is disabled.
|
||||
* The response is not already compressed, i.e. the `Content-Encoding` response header is not already set.
|
||||
* The response`Content-Type` header is not one among the [excludedContentTypes options](#excludedcontenttypes), or is one among the [includedContentTypes options](#includedcontenttypes).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue