(h http.Header)
| 156 | } |
| 157 | |
| 158 | func isEncodeAllowed(h http.Header) bool { |
| 159 | return !strings.Contains(h.Get("Cache-Control"), "no-transform") |
| 160 | } |
| 161 | |
| 162 | func (enc *Encode) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error { |
| 163 | if isEncodeAllowed(r.Header) { |