mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-24 07:56:24 +08:00
14 lines
315 B
Go
14 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
|
|
}
|