What resolved this issue is to set the following headers listed below.
Content-Type: "text/event-stream"
Connection: "keep-alive"
Transfer-Encoding: "chunked"
These headers help prevent proxy interference:
- Connection: "keep-alive" explicitly tells proxies not to close the connection, preventing premature termination
- Transfer-Encoding: "chunked" signals the proxy that variable-length chunks are normal, not an error
- Content-Type: "text/event-stream" hints to the proxy this is streaming data, deserving special handling