From 14fbf4f4361b7fb62d990f14d60a719b947dcda2 Mon Sep 17 00:00:00 2001 From: Dumitru Uzun Date: Fri, 4 Jul 2025 01:32:31 +0300 Subject: [PATCH] Remove 'Transfer-Encoding: identity' header The header 'Transfer-Encoding: identity' is not standard and when the Node.js app is behind an Nginx reverse proxy, it returns 502, because newer versions of Nginx do not support this header. --- index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/index.ts b/index.ts index 8c1abde..89c198f 100644 --- a/index.ts +++ b/index.ts @@ -48,7 +48,6 @@ export default class SseStream extends Transform { if (destination.writeHead) { destination.writeHead(200, { 'Content-Type': 'text/event-stream; charset=utf-8', - 'Transfer-Encoding': 'identity', 'Cache-Control': 'no-cache', Connection: 'keep-alive', })