Middleware documentation fixes
This commit is contained in:
parent
5ef6297daa
commit
502c88ee3f
24 changed files with 536 additions and 490 deletions
|
@ -1,11 +1,11 @@
|
|||
# Compress
|
||||
|
||||
Compressing the Response before Sending it to the Client
|
||||
Compress Responses before Sending them to the Client
|
||||
{: .subtitle }
|
||||
|
||||

|
||||
|
||||
The Compress middleware enables the gzip compression.
|
||||
The Compress middleware uses gzip compression.
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
|
@ -57,16 +57,16 @@ http:
|
|||
```
|
||||
|
||||
!!! info
|
||||
|
||||
Responses are compressed when:
|
||||
|
||||
|
||||
Responses are compressed when the following criteria are all met:
|
||||
|
||||
* The response body is larger than `1400` 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.
|
||||
|
||||
If Content-Type header is not defined, or empty, the compress middleware will automatically [detect](https://mimesniff.spec.whatwg.org/) a content type.
|
||||
It will also set accordingly the `Content-Type` header with the detected MIME type.
|
||||
|
||||
If the `Content-Type` header is not defined, or empty, the compress middleware will automatically [detect](https://mimesniff.spec.whatwg.org/) a content type.
|
||||
It will also set the `Content-Type` header according to the detected MIME type.
|
||||
|
||||
## Configuration Options
|
||||
|
||||
### `excludedContentTypes`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue