HTTP gzip directives
gzip_types directive
HTTP/server/location; adds eligible media types beyond text/html. Wildcard matches all types; review suitability.
Formal Syntax & Structure
nginx syntaxnginx
gzip_types mime-type ...;Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| mime-type | media type (one or more) | Additional response types eligible for gzip; text/html is included and * matches any type. |
Working Example
Example Snippetnginx
gzip_types text/css application/json;