From e1a79ae0bf329bd68d66a74b218effc28a16440a Mon Sep 17 00:00:00 2001 From: Giteabot Date: Thu, 2 May 2024 14:50:24 +0800 Subject: Skip gzip for some well-known compressed file types (#30796) (#30813) Backport #30796 by wxiaoguang Co-authored-by: wxiaoguang Co-authored-by: silverwind --- routers/web/web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers') diff --git a/routers/web/web.go b/routers/web/web.go index 9a6687059b..91ab378d97 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -54,7 +54,7 @@ import ( "github.com/prometheus/client_golang/prometheus" ) -const GzipMinSize = 1400 // min size to compress for the body size of response +var GzipMinSize = 1400 // min size to compress for the body size of response // optionsCorsHandler return a http handler which sets CORS options if enabled by config, it blocks non-CORS OPTIONS requests. func optionsCorsHandler() func(next http.Handler) http.Handler { -- cgit v1.2.3