mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
13 lines
315 B
Go
13 lines
315 B
Go
package setup
|
|
|
|
import (
|
|
"github.com/mholt/caddy/middleware"
|
|
"github.com/mholt/caddy/middleware/gzip"
|
|
)
|
|
|
|
// Gzip configures a new gzip middleware instance.
|
|
func Gzip(c *Controller) (middleware.Middleware, error) {
|
|
return func(next middleware.Handler) middleware.Handler {
|
|
return gzip.Gzip{Next: next}
|
|
}, nil
|
|
}
|