Ndoejs SSE res.write() not sending data in streams

后端 未结 1 1182
我寻月下人不归
我寻月下人不归 2021-01-06 09:20

I am trying to add SSE(Server sent events) in NodeJs, But when I am sending response using res.write() the data is not getting sent, but only after writing

1条回答
  •  我在风中等你
    2021-01-06 09:53

    If your Express server is behind a firewall or proxy server, they will often wait until the server closes the connection before sending the entire response. Instead, you need to have a connection between the browser and the server that allows the 'Connection': 'keep-alive'.

    0 讨论(0)
提交回复
热议问题