mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 11:01:22 +03:00
Bugfix/Add header to allow sse on nginx (#3214)
add header to allow sse on nginx
This commit is contained in:
@@ -27,6 +27,7 @@ const createAndStreamInternalPrediction = async (req: Request, res: Response, ne
|
||||
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 config: https://serverfault.com/a/801629
|
||||
res.flushHeaders()
|
||||
|
||||
const apiResponse = await utilBuildChatflow(req, true)
|
||||
|
||||
@@ -63,6 +63,7 @@ const createPrediction = async (req: Request, res: Response, next: NextFunction)
|
||||
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 config: https://serverfault.com/a/801629
|
||||
res.flushHeaders()
|
||||
|
||||
const apiResponse = await predictionsServices.buildChatflow(req)
|
||||
|
||||
Reference in New Issue
Block a user