1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

encode: Add "Vary" response header

This commit is contained in:
Matthew Holt 2019-06-30 23:38:36 -06:00
parent 3177ee8010
commit 9f8d3611eb

View file

@ -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
}