-
Notifications
You must be signed in to change notification settings - Fork 176
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
SSE not working when app is behind Nginx. #73
Comments
According to one suggestion the app-server needs to add this header-value: |
Thanks for raising the issue. I've implemented #74 which should allow you to specify headers like: s := sse.New()
s.Headers["X-Accel-Buffering"] = "no"
... Please could you give it a try? |
@purehyperbole It didn't do any difference |
@purehyperbole Forget the previous comment! it did actually work and I discovered why by pure randomness. The key was to restart the Client when deploying and starting the new server-binary with the changes. Why It only works when restarting the Client, is something I would like to know and I will do more testing and research into it. I will also try to not include the |
Thanks for testing. I'll merge that PR now 😄 |
So far I have learned this (For future, if anyone ends in the same probles):
|
@purehyperbole Everything in the library works as it should with regarding Nginx. If anyone in future have the same problem or similar, just point them to this issue. |
Has anyone managed to get their Go server app to work when its placed behind Nginx reverse-proxy setup in Ubuntu server?
I have followed these suggestions below without any success
For Server-Sent Events (SSE) what Nginx proxy configuration is appropriate?
EventSource / Server-Sent Events through Nginx
My
POST
andGET
requests work as intended, but when the server app needs to publish something out to clients, the clients never receives anything.The text was updated successfully, but these errors were encountered: