HTTP gzip directives
gzip directive
HTTP/server/location/if in location; default off. Enables runtime gzip filtering of eligible responses.
Formal Syntax & Structure
nginx syntaxnginx
gzip on | off;Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| state | on | off | Allow eligible responses to be compressed; avoid secrets mixed with attacker-controlled input. |
Working Example
Example Snippetnginx
gzip on;