Skip to content

Commit 40f7eb6

Browse files
committed
slightly simplify the Middleware implementation
Signed-off-by: Valery Piashchynski <[email protected]>
1 parent e5e9a63 commit 40f7eb6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plugin.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ func (g *Plugin) Init() error {
1515
}
1616

1717
func (g *Plugin) Middleware(next http.Handler) http.Handler {
18-
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
19-
gzhttp.GzipHandler(next).ServeHTTP(w, r)
20-
})
18+
return gzhttp.GzipHandler(next)
2119
}
2220

2321
func (g *Plugin) Name() string {

0 commit comments

Comments
 (0)