summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2024-05-02 14:50:24 +0800
committerGitHub <noreply@github.com>2024-05-02 14:50:24 +0800
commite1a79ae0bf329bd68d66a74b218effc28a16440a (patch)
treedbc97a467fc20cab8e2b04e2f973f4ce13bbe9ac /routers
parentac91bb27ffaad293f86b8160ed1d90159df6242f (diff)
downloadgitea-e1a79ae0bf329bd68d66a74b218effc28a16440a.tar.gz
gitea-e1a79ae0bf329bd68d66a74b218effc28a16440a.zip
Skip gzip for some well-known compressed file types (#30796) (#30813)
Backport #30796 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'routers')
-rw-r--r--routers/web/web.go2
1 files changed, 1 insertions, 1 deletions
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 {