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

Allowing gzip compression to be disabled by setting gzip: false #38

Closed
wants to merge 1 commit into from
Closed

Conversation

city41
Copy link
Contributor

@city41 city41 commented Mar 22, 2014

This pull request allows gzip compression to be skipped by setting a gzip option to false

Why I needed this

My app is based around Restify, which provides its own gzipResponse middleware. This middleware gzips all responses blindly. Restify can also serve static content, but its static content serving is very primitive. I wanted to use st for static content, but still allow gzipResponse to gzip everything. Without this setting, static content would get gzipped twice.

It is simpler to set up my static endpoints and hand them off to st, than have gzipResponse try and figure out when it should or should not compress.

I'm not sure if this fits your vision for st, but I figured I send a pull request in case it does.

@isaacs
Copy link
Owner

isaacs commented Mar 24, 2014

Landed on ab75c55. Thanks!

@isaacs isaacs closed this Mar 24, 2014
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

Successfully merging this pull request may close these issues.

2 participants