expresse icon indicating copy to clipboard operation
expresse copied to clipboard

Issue with webpack-dev-server compression

Open yh54321 opened this issue 5 years ago • 1 comments

As stated in the documentation SSE encounters problem when undergoing compression. The proposed flushAfterWrite: true is not effective for webpack-dev-server compression (which is used in create-react-app). To resolve this, one can set the 'Cache-Control' response header to 'no-cache, no-transform' (at least while not in production). I wasn't sure how to alter response headers using expresse, so I uninstalled.

yh54321 avatar Feb 12 '20 06:02 yh54321

Thanks a lot for signaling that. This will be taken in account in a future version. Also, you should be able to change the response headers in the middleware with res.header('Cache-Control', 'no-cache, no-transform'), there are no particular restrictions.

toverux avatar Feb 12 '20 09:02 toverux