From 64c66cca41a1e0d8454c2ab1b1483e468ccfcfa6 Mon Sep 17 00:00:00 2001 From: Dumitru Uzun Date: Sat, 2 Mar 2024 23:10:16 +0100 Subject: [PATCH] Add header 'X-Accel-Buffering: no' Add header 'X-Accel-Buffering: no' to tell Nginx to disable buffering. wiki.nginx.org/X-accel#X-Accel-Buffering --- index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/index.ts b/index.ts index 8c1abde..e10ec1d 100644 --- a/index.ts +++ b/index.ts @@ -50,6 +50,7 @@ export default class SseStream extends Transform { 'Content-Type': 'text/event-stream; charset=utf-8', 'Transfer-Encoding': 'identity', 'Cache-Control': 'no-cache', + 'X-Accel-Buffering': 'no', Connection: 'keep-alive', }) destination.flushHeaders()