mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-02 05:33:38 +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
|
|
}
|