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

Option to disable the compression for the webpack dev server #7847

Closed
joshiste opened this issue Oct 19, 2019 · 3 comments
Closed

Option to disable the compression for the webpack dev server #7847

joshiste opened this issue Oct 19, 2019 · 3 comments

Comments

@joshiste
Copy link

Currently the compression is always activated for the webpack dev server. Currently this is a problem if you want to proxy chunked responses for SSE.
I'd appreciate an option to disable the compression of the dev server, as I currently found no other solution to this problem (more details chimurai/http-proxy-middleware#371).

@dlasky
Copy link

dlasky commented Oct 21, 2019

running into the same thing, it doesnt seem like there is a great workaround besides hardcoding this:

but it would be nice if this was an ENV or could be overridden in setupProxy if present

edit: after quite a bit of digging, it looks like the compress() middleware honors cache-control: no-transform headers so its possible to override the proxy to send that which avoids the compression and thus the buffering/timeout behavior.

@jcmoore
Copy link

jcmoore commented Oct 21, 2019

FYI @joshiste , spent some time earlier looking for work arounds with @dlasky

If you can send a Cache-Control header with no-transform, you can avoid compression.

It may be that adding some middleware in this style (with no-transform of course) will be sufficient.

@heyimalex
Copy link
Contributor

I’m going to close this since there appears to be a decent workaround, let me know if you think it should be reopened!

@lock lock bot locked and limited conversation to collaborators Dec 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants