Skip to content

Instantly share code, notes, and snippets.

@gucheen
Created March 30, 2017 09:50
Show Gist options
  • Save gucheen/adb7a65e9df197f5b84f768d098d2d24 to your computer and use it in GitHub Desktop.
Save gucheen/adb7a65e9df197f5b84f768d098d2d24 to your computer and use it in GitHub Desktop.
gzip configuration for front end projects
gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_proxied any;
gzip_types
# text/html is always compressed by HttpGzipModule
text/css
text/javascript
text/xml
text/plain
text/x-component
application/javascript
application/json
application/xml
application/rss+xml
font/truetype
font/opentype
application/vnd.ms-fontobject
image/svg+xml;
gzip_static on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment