fix: nginx sse in reverse proxy
This commit is contained in:
parent
1a567c6e12
commit
f279f8ae05
@ -110,6 +110,11 @@
|
|||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:${toString cfg.port}";
|
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} = {
|
services.redis.servers.${pname} = {
|
||||||
|
@ -70,6 +70,7 @@ func streamingRoomStates(
|
|||||||
w.Header().Set("Cache-Control", "no-cache")
|
w.Header().Set("Cache-Control", "no-cache")
|
||||||
w.Header().Set("Connection", "keep-alive")
|
w.Header().Set("Connection", "keep-alive")
|
||||||
w.Header().Set("Content-Type", "text/event-stream")
|
w.Header().Set("Content-Type", "text/event-stream")
|
||||||
|
w.Header().Set("X-Accel-Buffering", "no")
|
||||||
|
|
||||||
templFile := "templates/room.gohtml"
|
templFile := "templates/room.gohtml"
|
||||||
tableTemplates := "templates/tableTemplates.gohtml"
|
tableTemplates := "templates/tableTemplates.gohtml"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user