Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gzip doesn't work #43

Open
polyrabbit opened this issue Dec 16, 2014 · 3 comments
Open

gzip doesn't work #43

polyrabbit opened this issue Dec 16, 2014 · 3 comments

Comments

@polyrabbit
Copy link

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?

@mokibenjak
Copy link

Hi,

I can confirm that nginx is not gzipping the response on Heroku, although gzip is on in the conf file.

@vaibhav-jain
Copy link

If you solved this issue please tell me how ??

@AndreLion
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants