mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-19 05:42:45 +08:00
encode: Add "Vary" response header
This commit is contained in:
parent
3177ee8010
commit
9f8d3611eb
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user