# Enable gzip for common text-based responses. gzip on; gzip_vary on; # Keep the default compression level moderate so the CPU cost stays predictable # on small VPS instances. gzip_comp_level 4; gzip_min_length 256; # This does not remove ETag or Last-Modified headers; it only controls when # nginx may gzip requests that already passed through an intermediary proxy. gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-web-app-manifest+json application/xhtml+xml application/xml image/svg+xml text/css text/javascript text/plain text/xml text/vtt; # Do not list text/html here. nginx already compresses it implicitly, and # repeating it suggests callers need to keep the two lists in sync.