From daffb0f86e745bb1633515a0647465ec3f997773 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Fri, 16 Sep 2022 11:19:31 +0300 Subject: [PATCH] [#488] added X-Accel-Buffering:no sse header --- apis/realtime.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apis/realtime.go b/apis/realtime.go index 414614337..418b2da59 100644 --- a/apis/realtime.go +++ b/apis/realtime.go @@ -48,6 +48,9 @@ func (api *realtimeApi) connect(c echo.Context) error { c.Response().Header().Set("Content-Type", "text/event-stream; charset=UTF-8") c.Response().Header().Set("Cache-Control", "no-store") c.Response().Header().Set("Connection", "keep-alive") + // https://github.com/pocketbase/pocketbase/discussions/480#discussioncomment-3657640 + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering + c.Response().Header().Set("X-Accel-Buffering", "no") event := &core.RealtimeConnectEvent{ HttpContext: c,