|
|
@ -184,6 +184,10 @@ func (h *requestHandler) ServeHTTP(writer http.ResponseWriter, request *http.Req |
|
|
|
|
|
|
|
|
|
|
|
// magic header instructs nginx + apache to not buffer response body
|
|
|
|
// magic header instructs nginx + apache to not buffer response body
|
|
|
|
writer.Header().Set("X-Accel-Buffering", "no") |
|
|
|
writer.Header().Set("X-Accel-Buffering", "no") |
|
|
|
|
|
|
|
// A web-compliant header telling all middleboxes to disable caching.
|
|
|
|
|
|
|
|
// Should be able to prevent overloading the cache, or stop CDNs from
|
|
|
|
|
|
|
|
// teeing the response stream into their cache, causing slowdowns.
|
|
|
|
|
|
|
|
writer.Header().Set("Cache-Control", "no-store") |
|
|
|
if !h.config.NoSSEHeader { |
|
|
|
if !h.config.NoSSEHeader { |
|
|
|
// magic header to make the HTTP middle box consider this as SSE to disable buffer
|
|
|
|
// magic header to make the HTTP middle box consider this as SSE to disable buffer
|
|
|
|
writer.Header().Set("Content-Type", "text/event-stream") |
|
|
|
writer.Header().Set("Content-Type", "text/event-stream") |
|
|
|