From 9f8d3611eb9e29d673542877c3cc06a7456a5eea Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sun, 30 Jun 2019 23:38:36 -0600 Subject: encode: Add "Vary" response header --- modules/caddyhttp/encode/encode.go | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/caddyhttp') diff --git a/modules/caddyhttp/encode/encode.go b/modules/caddyhttp/encode/encode.go index fc0a537..3eebe68 100644 --- a/modules/caddyhttp/encode/encode.go +++ b/modules/caddyhttp/encode/encode.go @@ -219,6 +219,7 @@ func (rw *responseWriter) init() { rw.w.Reset(rw.ResponseWriter) rw.Header().Del("Content-Length") // https://github.com/golang/go/issues/14975 rw.Header().Set("Content-Encoding", rw.encodingName) + rw.Header().Add("Vary", "Accept-Encoding") } rw.Header().Del("Accept-Ranges") // we don't know ranges for dynamically-encoded content } -- cgit v1.2.3