xin

Directive reference

gzip

Enables gzip response compression.

Syntaxgzip on | off;
Contextshttpserverlocationif in location
Defaultgzip off;

Behavior

Eligibility also depends on status, content type, minimum length, existing Content-Encoding and the client's Accept-Encoding header.

Example

gzip on;
gzip_types text/plain text/css application/json;

Related directives

gzip_types · gzip_min_length