fix: add X-Accel-Buffering header to bypass Nginx Proxy Manager buffering for SSE
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 40s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 40s
This commit is contained in:
@@ -68,6 +68,7 @@ app.get('/api/stream', (req, res) => {
|
|||||||
res.setHeader('Content-Type', 'text/event-stream');
|
res.setHeader('Content-Type', 'text/event-stream');
|
||||||
res.setHeader('Cache-Control', 'no-cache');
|
res.setHeader('Cache-Control', 'no-cache');
|
||||||
res.setHeader('Connection', 'keep-alive');
|
res.setHeader('Connection', 'keep-alive');
|
||||||
|
res.setHeader('X-Accel-Buffering', 'no'); // Bypass Nginx Proxy Manager buffering
|
||||||
res.flushHeaders();
|
res.flushHeaders();
|
||||||
|
|
||||||
// Send initial connection event
|
// Send initial connection event
|
||||||
|
|||||||
Reference in New Issue
Block a user