From 7995c44d47075cca01c44120e5617d1d90b2a039 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Sat, 5 Jun 2021 21:28:09 +0300 Subject: - 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 --- plugins/gzip/plugin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/gzip/plugin.go') 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) }) } -- cgit v1.2.3