summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/encode/gzip
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/encode/gzip')
-rw-r--r--modules/caddyhttp/encode/gzip/gzip.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/caddyhttp/encode/gzip/gzip.go b/modules/caddyhttp/encode/gzip/gzip.go
index 156eb0d..f8e16c9 100644
--- a/modules/caddyhttp/encode/gzip/gzip.go
+++ b/modules/caddyhttp/encode/gzip/gzip.go
@@ -40,6 +40,10 @@ func (g Gzip) Validate() error {
return nil
}
+// AcceptEncoding returns the name of the encoding as
+// used in the Accept-Encoding request headers.
+func (Gzip) AcceptEncoding() string { return "gzip" }
+
// NewEncoder returns a new gzip writer.
func (g Gzip) NewEncoder() encode.Encoder {
writer, _ := gzip.NewWriterLevel(nil, g.Level)
@@ -51,7 +55,7 @@ var defaultGzipLevel = 5
// Interface guards
var (
- _ encode.Encoding = (*Gzip)(nil)
+ _ encode.Encoding = (*Gzip)(nil)
_ caddy.Provisioner = (*Gzip)(nil)
_ caddy.Validator = (*Gzip)(nil)
)