summaryrefslogtreecommitdiff
path: root/plugins/gzip
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-04-28 14:10:27 +0300
committerValery Piashchynski <[email protected]>2021-04-28 14:10:27 +0300
commit30c25f17fa7d6386e33a4894c812f7ca5db990ad (patch)
tree03f53535addf71a81eca4b9a1d3ba29d4ebf4984 /plugins/gzip
parent4cb2247f909d02c922edb6f8e3d3741cc5a2c077 (diff)
- Fix middleware order
- Update tests - Move worker handler into a separate folder with separate package name Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/gzip')
-rw-r--r--plugins/gzip/plugin.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/gzip/plugin.go b/plugins/gzip/plugin.go
index 949c6888..18ee7b88 100644
--- a/plugins/gzip/plugin.go
+++ b/plugins/gzip/plugin.go
@@ -15,10 +15,10 @@ func (g *Plugin) Init() error {
return nil
}
-func (g *Plugin) Middleware(next http.Handler) http.HandlerFunc {
- return func(w http.ResponseWriter, r *http.Request) {
+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)
- }
+ })
}
func (g *Plugin) Name() string {