-
these are the current headers in sse.go: w.Header().Set("Cache-Control", "no-cache")
w.Header().Set("Connection", "keep-alive")
w.Header().Set("Content-Type", "text/event-stream") Can we add : w.Header().Set("X-Accel-Buffering", "no") Basically you need to turn buffering off for nginx/caddy (not completely, just for the SSE responses) https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Probably a good idea. What do you think, @delaneyj? This is already included in the PHP SDK. datastar/sdk/php/src/ServerSentEventGenerator.php Lines 104 to 106 in ff6cdce |
Beta Was this translation helpful? Give feedback.
-
It's a nginx only thing, I'm saying no until I hear a better argument as you can inject in your nginx config via https://nginx.org/en/docs/http/ngx_http_headers_module.html#add_header |
Beta Was this translation helpful? Give feedback.
It's a nginx only thing, I'm saying no until I hear a better argument as you can inject in your nginx config via https://nginx.org/en/docs/http/ngx_http_headers_module.html#add_header