You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Caddy 2.2.0, the responses from the server are only sent unbuffered when the content type is text/event-stream. NodeJS express sends out a Content Type of text/event-stream; charset=utf-8.
I am not so deep in the specs to know if caddy or express is at fault. I would expect caddy to gracefully accept any arguments to the content-type: text/event-stream.
Workaround 1
It is possible to get it working with express (by not using express, but the underlaying nodejs function calls directly).
Yes, indeed. I stumbled across this issue when using Next.js, which adds the same charset parameter to its event streams. A temporary 'fix' is to set flush_interval to -1:
reverse_proxy {
...
flush_interval -1
}
Edit: Just noticed that the workaround was already mentioned above 🙈
With Caddy 2.2.0, the responses from the server are only sent unbuffered when the content type is
text/event-stream
. NodeJS express sends out a Content Type oftext/event-stream; charset=utf-8
.I am not so deep in the specs to know if caddy or express is at fault. I would expect caddy to gracefully accept any arguments to the
content-type: text/event-stream
.Workaround 1
It is possible to get it working with express (by not using express, but the underlaying nodejs function calls directly).
Workaraound 2
Setting
flush_interval
to-1
in the Caddyfile works as well.The text was updated successfully, but these errors were encountered: