[MM-45309] Replace github.com/mattermost/gziphandler with github.com/klauspost/compress/gzhttp (#24293)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
eb35e83152
Коммит
e4fa6200c3
@@ -13,7 +13,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/mattermost/gziphandler"
|
||||
"github.com/klauspost/compress/gzhttp"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
@@ -39,8 +39,8 @@ func (w *Web) InitStatic() {
|
||||
pluginHandler := staticFilesHandler(http.StripPrefix(path.Join(subpath, "static", "plugins"), http.FileServer(http.Dir(*w.srv.Config().PluginSettings.ClientDirectory))))
|
||||
|
||||
if *w.srv.Config().ServiceSettings.WebserverMode == "gzip" {
|
||||
staticHandler = gziphandler.GzipHandler(staticHandler)
|
||||
pluginHandler = gziphandler.GzipHandler(pluginHandler)
|
||||
staticHandler = gzhttp.GzipHandler(staticHandler)
|
||||
pluginHandler = gzhttp.GzipHandler(pluginHandler)
|
||||
}
|
||||
|
||||
w.MainRouter.PathPrefix("/static/plugins/").Handler(pluginHandler)
|
||||
|
||||
Ссылка в новой задаче
Block a user