adds header to improve nginx compatibility

This commit is contained in:
nai-degen
2023-05-23 11:57:14 -05:00
parent 03616f4bbc
commit 13b6a3d7b8
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -299,6 +299,7 @@ function initStreaming(req: Request) {
res.setHeader("Content-Type", "text/event-stream");
res.setHeader("Cache-Control", "no-cache");
res.setHeader("Connection", "keep-alive");
res.setHeader("X-Accel-Buffering", "no"); // nginx-specific fix
res.flushHeaders();
res.write("\n");
res.write(": joining queue\n\n");