Update routers/web/web.go

Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
Lunny Xiao 2024-04-20 20:13:28 +08:00 committed by GitHub
parent e6b860e28f
commit 8d11f03b75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ func Routes() *web.Route {
var mid []any
if setting.EnableGzip {
wrapper, err := gzhttp.NewWrapper(gzhttp.MinSize(GzipMinSize), gzhttp.CompressionLevel(gzip.BestSpeed))
wrapper, err := gzhttp.NewWrapper(gzhttp.MinSize(GzipMinSize), gzhttp.CompressionLevel(6)) // 6 is a good general tradeoff between speed, CPU usage, and compression
if err != nil {
log.Fatal("GzipHandlerWithOpts failed: %v", err)
}