SSE can't receive EventStream messages by browser #2034
-
Beta Was this translation helpful? Give feedback.
Answered by
generalworksinc
Jun 8, 2023
Replies: 1 comment 6 replies
-
Hm I'm not sure. Are there any errors/warnings in the console? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@davidpdrsn
Based on the provided sample, I was able to investigate and resolve the issue myself.
In my code, I had enabled the CompressionLayer for all routers, which also compressed the Server-Sent Events (SSE) processing. As a result, the browser was unable to recognize the events.
As a solution, I prevented compression when the content-type header is "text/event-stream". This allowed me to verify the functionality without any issues.