Monday, 7 September 2020

Server side events blocked by antivirus

I'm implementing a server side event client in JavaScript, using EventSource. Messages sent by the backend never reached the frontend until I realized that my antivirus blocks them. As soon as I turned it off, the events started to work as expected and the messages arrived.

While of course I can disable this obnoxious busybody of a bugware on own my computer, but I can't ask my users to do the same. Also, it seems that Windows Security is blocking EventSource traffic too.

A lot of websites are using EventSource though, and they don't seem to be blocked. What's the secret?

What I'm trying to do is to give feedback to the frontend about a long conversion process running on the server. If you have a better idea than EventSource, please tell.

Update: Here's a working example of SSE: https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_sse

This works in my browser. But if I replace the event source with my own API, it fails again.



from Server side events blocked by antivirus

No comments:

Post a Comment