diff options
author | Valery Piashchynski <[email protected]> | 2021-04-29 10:25:45 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-29 10:25:45 +0300 |
commit | 7297e5f2fad841466024f8622da3e14b7874f989 (patch) | |
tree | 6c982f5ace059292ec7f748bd32fa6d1ca7719f0 /plugins/gzip/plugin.go | |
parent | a6b755e344324505ea0d327ff12fb9eeae7d6dab (diff) | |
parent | 2812157be7a9c1411d02872f0b9fa567bcf7a9b7 (diff) |
#646 feat(static): completely rework `static` plugin
#646 feat(static): completely rework `static` plugin
Diffstat (limited to 'plugins/gzip/plugin.go')
-rw-r--r-- | plugins/gzip/plugin.go | 6 |
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 { |