This commit is contained in:
seb
2026-10-16 00:59:31 +02:00
parent 29a07d132c
commit 78ad8f12e4
6 changed files with 471 additions and 173 deletions

View File

@@ -548,8 +548,12 @@ export function register(app, basePath = '') {
!req.headers.accept?.includes('application/json');
if (wantsSse) {
req.socket?.setTimeout(0);
res.setTimeout?.(0);
req.socket?.setNoDelay(true);
res.setHeader('Content-Type', 'text/event-stream');
res.setHeader('Cache-Control', 'no-cache');
res.setHeader('Cache-Control', 'no-cache, no-transform');
res.setHeader('Connection', 'keep-alive');
res.setHeader('X-Accel-Buffering', 'no');
if (typeof res.flushHeaders === 'function') {