diff --git a/handler.go b/handler.go index 643a812..a942c2a 100644 --- a/handler.go +++ b/handler.go @@ -63,7 +63,7 @@ func (g *gzipHandler) Handle(c *gin.Context) { func (g *gzipHandler) shouldCompress(req *http.Request) bool { if !strings.Contains(req.Header.Get("Accept-Encoding"), "gzip") || strings.Contains(req.Header.Get("Connection"), "Upgrade") || - strings.Contains(req.Header.Get("Content-Type"), "text/event-stream") { + strings.Contains(req.Header.Get("Accept"), "text/event-stream") { return false }