Skip to content

Instantly share code, notes, and snippets.

@DrMartiner
Created January 27, 2013 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DrMartiner/4646463 to your computer and use it in GitHub Desktop.
Save DrMartiner/4646463 to your computer and use it in GitHub Desktop.
Gzip JSON response at location
server {
# ...
location /api/ {
uwsgi_pass unix:///var/run/uwsgi/app/project/socket;
include uwsgi_params;
uwsgi_buffers 8 128k;
client_max_body_size 10M;
gzip on;
gzip_comp_level 8;
gzip_min_length 1000;
gzip_types text/plain application/json;
gzip_proxied expired no-cache no-store private auth;
}
location / {
# ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment