diff options
author | Valery Piashchynski <[email protected]> | 2021-06-05 21:28:09 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-06-05 21:28:09 +0300 |
commit | 7995c44d47075cca01c44120e5617d1d90b2a039 (patch) | |
tree | 83f9c35ff54945bd8173d0e7201234d17341007c /plugins/gzip | |
parent | d0ec24066b5fbb4e3accc9c45f72f7c638b35dba (diff) |
- Switch to better gzip middleware (performance)
- Use EXISTS to check of the particular topic exists in the redis
cluster instead of SMEMBERS
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/gzip')
-rw-r--r-- | plugins/gzip/plugin.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/gzip/plugin.go b/plugins/gzip/plugin.go index 24b125fb..a957878c 100644 --- a/plugins/gzip/plugin.go +++ b/plugins/gzip/plugin.go @@ -3,7 +3,7 @@ package gzip import ( "net/http" - "github.com/NYTimes/gziphandler" + "github.com/klauspost/compress/gzhttp" ) const PluginName = "gzip" @@ -17,7 +17,7 @@ func (g *Plugin) Init() error { func (g *Plugin) Middleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - gziphandler.GzipHandler(next).ServeHTTP(w, r) + gzhttp.GzipHandler(next).ServeHTTP(w, r) }) } |