location /sse/ {
# enables EventSource support
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_buffering off;
}
Content-Type: text/event-stream;
Cache-Control: no-cache;
X-Accel-Buffering: no;
location /sse/ {
# enables EventSource support
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_buffering off;
}
Content-Type: text/event-stream;
Cache-Control: no-cache;
X-Accel-Buffering: no;
# location /ws/ {
location ~* \.ws$ {
# enables WS support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# prevents 502 bad gateway error
proxy_buffers 8 32k;
proxy_buffer_size 64k;
reset_timedout_connection on;
}