1

When I try to access server-sent events endpoint locally it works fine and spits out data every two seconds, when I ssh into the appengine vm it also works fine (using curl) but when I try and access the server-side events endpoint from outside appengine I just get timeouts. Is server-side events blocked in GAE? I see that websocket could be troublesome, but server-side events are over http.

Pylinux
  • 11,278
  • 4
  • 60
  • 67

1 Answers1

3

No, server-sent events are not blocked in Google App Engine. But since GAE have buffering enabled by default they will never reach you since the request never completes. Disable buffering with this header in your SSE response:

X-Accel-Buffering: no

Read more here: How Requests are Handled

Pylinux
  • 11,278
  • 4
  • 60
  • 67
  • 1
    Hi @Pylinux, good work finding the solution! Can you [accept your own answer](https://stackoverflow.blog/2009/01/06/accept-your-own-answers/)? It will make it more visible and help someone with the same issue as you find the solution. Thanks! – llompalles Apr 16 '19 at 08:33