Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Proxy Buffers EventSources #3391
Is this a bug report?
Can you also reproduce the problem with npm 4.x?
Steps to Reproduce
I've got an existing app that I'd like to rewrite using React. The app has a Go backend that provides an EventSource endpoint. I attempted to use the proxy functionality of the development server to route requests for the endpoint to the Go backend.
It should print a list of numbers in the browser console.
Nothing happens at all until I kill the Go backend process, at which point all of the events that the backend had sent arrive suddenly all at once. The EventSource also occasionally calls its
Note also that the code works completely fine if I serve the files produced by
After lurking around the internet having the same problem, I think this is related to #966. I think an ok fix would be to toggle webpack dev server's compression via an ENV variable of some kind.
A workaround might be to enable CORS on the SSE server and connect to it directly