fix(fastify-sse): add X-Accel-Buffering header to per-request startSSE

Aligns with hub.ts which already includes this header. Prevents
nginx/Traefik from buffering SSE chunks behind a reverse proxy.
This commit is contained in:
saravanakumardb1 2026-03-29 12:47:13 -07:00
parent e194365711
commit e6ccaec2fe
2 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,7 @@ describe('per-request SSE helpers', () => {
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache',
Connection: 'keep-alive',
'X-Accel-Buffering': 'no',
});
});

View File

@ -11,6 +11,7 @@ export function startSSE(reply: FastifyReply): void {
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache',
Connection: 'keep-alive',
'X-Accel-Buffering': 'no',
});
reply.hijack();
}