MatthewWid / better-sse

⬆ Dead simple, dependency-less, spec-compliant server-sent events implementation for Node, written in TypeScript.
https://matthewwid.github.io/better-sse/
MIT License
559 stars 14 forks source link

Additional cache response headers #41

Closed MatthewWid closed 2 years ago

MatthewWid commented 2 years ago

Resolves #38.

This PR adds the additional response headers Pragma and X-Accel-Buffering and updates the Cache-Control header value, each to disable data transformation, proxy buffering and shared caching to completely disable response data caching.

This ensures that the data sent to the client is unmodified and fresh, as is intended for the correct operation of the event stream mechanism.