# https://tweaked.io/guide/nginx/ control to save CPU. gzip on; gzip_vary on; # Don't compress anything that's already small and unlikely to shrink much # if at all (the default is 20 bytes, which is bad as that usually leads to # larger files after gzipping). Set to 10K. gzip_min_length 10000; # Compression level (1-9). # 5 is a perfect compromise between size and cpu usage, offering about # 75% reduction for most ascii files (almost identical to level 9). gzip_comp_level 5; gzip_proxied expired no-cache no-store private auth; gzip_disable "MSIE [1-6]\."; # Compress all output labeled with one of the following MIME-types. https://mattstauffer.co/blog/enabling-gzip-on-nginx-servers-including-laravel-forge gzip_types application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/svg+xml image/x-icon text/css text/plain text/x-component; # text/html is always compressed by HttpGzipModule