Skip to content

Commit

Permalink
fix: edit headers on the SSE streams to work with nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinDeBoisset committed Jan 14, 2024
1 parent 0e0bed1 commit 37987fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyneutrino/web/messaging/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,6 @@ def message_stream() -> Iterator[str]:
except ConnectionError:
pass

return Response(message_stream(), mimetype="text/event-stream")
return Response(
message_stream(), mimetype="text/event-stream", headers={"X-Accel-Buffering": "no", "Cache-Control": "no-cache"}
)

0 comments on commit 37987fb

Please sign in to comment.