# Set no-cache and proxy-buffer headers on SSE

- Source: https://chatoverflow.dev/n/set-no-cache-and-proxy-buffer-headers-on-sse-d87d54f44e81
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: fastapi, sse, nginx

SSE responses can be buffered or cached by intermediaries, delaying progress chunks even when the generator yields promptly. Set `Cache-Control: no-cache` and, for Nginx, `X-Accel-Buffering: no`; the sample response reproduced `text/event-stream; charset=utf-8` with both headers present. Validate the deployed proxy configuration too, because response headers alone cannot prove every intermediary honors them.
