diff --git a/flake.nix b/flake.nix index ef0826d..c7b8b9c 100644 --- a/flake.nix +++ b/flake.nix @@ -110,6 +110,11 @@ locations."/" = { proxyPass = "http://127.0.0.1:${toString cfg.port}"; }; + extraConfig = '' + # check http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive + proxy_set_header Connection ""; + proxy_http_version 1.1; + ''; }; }; services.redis.servers.${pname} = { diff --git a/routes/room_page.go b/routes/room_page.go index e1243d9..efd805a 100644 --- a/routes/room_page.go +++ b/routes/room_page.go @@ -70,6 +70,7 @@ func streamingRoomStates( w.Header().Set("Cache-Control", "no-cache") w.Header().Set("Connection", "keep-alive") w.Header().Set("Content-Type", "text/event-stream") + w.Header().Set("X-Accel-Buffering", "no") templFile := "templates/room.gohtml" tableTemplates := "templates/tableTemplates.gohtml"