[MM-45309] Replace github.com/mattermost/gziphandler with github.com/klauspost/compress/gzhttp (#24293)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
eb35e83152
Коммит
e4fa6200c3
@@ -14,12 +14,11 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/klauspost/compress/gzhttp"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"github.com/opentracing/opentracing-go/ext"
|
||||
spanlog "github.com/opentracing/opentracing-go/log"
|
||||
|
||||
"github.com/mattermost/gziphandler"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/i18n"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
@@ -474,7 +473,7 @@ func (w *Web) APIHandler(h func(*Context, http.ResponseWriter, *http.Request)) h
|
||||
IsLocal: false,
|
||||
}
|
||||
if *w.srv.Config().ServiceSettings.WebserverMode == "gzip" {
|
||||
return gziphandler.GzipHandler(handler)
|
||||
return gzhttp.GzipHandler(handler)
|
||||
}
|
||||
return handler
|
||||
}
|
||||
@@ -494,7 +493,7 @@ func (w *Web) APIHandlerTrustRequester(h func(*Context, http.ResponseWriter, *ht
|
||||
IsLocal: false,
|
||||
}
|
||||
if *w.srv.Config().ServiceSettings.WebserverMode == "gzip" {
|
||||
return gziphandler.GzipHandler(handler)
|
||||
return gzhttp.GzipHandler(handler)
|
||||
}
|
||||
return handler
|
||||
}
|
||||
@@ -513,7 +512,7 @@ func (w *Web) APISessionRequired(h func(*Context, http.ResponseWriter, *http.Req
|
||||
IsLocal: false,
|
||||
}
|
||||
if *w.srv.Config().ServiceSettings.WebserverMode == "gzip" {
|
||||
return gziphandler.GzipHandler(handler)
|
||||
return gzhttp.GzipHandler(handler)
|
||||
}
|
||||
return handler
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user