nginx-buildpack
nginx-buildpack copied to clipboard
gzip doesn't work
Hey all, Thanks for your work!
I'm having trouble getting gzip to work on heroku. Here is my nginx config file and here is my web app deployed on heroku http://o.hackernews.im and my test command curl -I -v -H "Accept-Encoding: gzip,deflate" http://o.hackernews.im
The weird thing is with the same config file and same run command, I can get a gzipped response from my development environment, but when deployed on heroku, no matter how hard I try, I just cannot get the response gzipped. Any one else has the same problem with me?
Hi,
I can confirm that nginx is not gzipping the response on Heroku, although gzip is on in the conf file.
If you solved this issue please tell me how ??
I was inspired by another nginx-like buildpack heroku-buildpack-static which is working perfect with gzip on. Copying its gzip config and replace ourselve' will fix this issue:
gzip on;
gzip_comp_level 6;
gzip_min_length 512;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_vary on;
gzip_proxied any;
Hope this helps.