This change makes the SSE server work with chi's Compress middleware. Compress uses response headers to determine if the response body is compressible, so the headers should be written out before flushing. Hope this change can save other users a couple of hours of digging.
This change makes the SSE server work with chi's Compress middleware. Compress uses response headers to determine if the response body is compressible, so the headers should be written out before flushing. Hope this change can save other users a couple of hours of digging.