Replies: 1 comment
-
|
The third argument of eventStream is a ResponsInit so you can pass custom headers there. I don't add extra non-standard headers because there's always another tool needing another custom header, instead the lib gives you the option to add the ones you need, and you can wrap it if you need to always do it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I just ran into an issue where nginx was buffering the response of an sse endpoint using the eventStream helper from this package. Looks like nginx buffers responses from reverse proxy servers by default as a perf optimization, so it can do things like gzip responses. But for sse, this just causes nginx to hang forever because the response never really ends.
There's a special header you can set,
X-Accel-Buffering: no, that tells nginx not to buffer that response. It'd be cool ifeventStreamautomatically set it.Beta Was this translation helpful? Give feedback.
All reactions