-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
bug 🐞Something isn't workingSomething isn't working
Milestone
Description
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).
res.writeHead(200, {
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache',
'X-Accel-Buffering': 'no',
'Transfer-Encoding': 'chunked',
});
Workaraound 2
Setting flush_interval
to -1
in the Caddyfile works as well.
Metadata
Metadata
Assignees
Labels
bug 🐞Something isn't workingSomething isn't working