mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-05 11:19:45 +02:00
correct Cache-contol header missusage.
This commit is contained in:
@@ -107,7 +107,7 @@ func respondWithImage(r *http.Request, rw http.ResponseWriter, data []byte, imgU
|
||||
gzipped := strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") && conf.GZipCompression > 0
|
||||
|
||||
rw.Header().Set("Expires", time.Now().Add(time.Second*time.Duration(conf.TTL)).Format(http.TimeFormat))
|
||||
rw.Header().Set("Cache-Control", fmt.Sprintf("Cache-Control: max-age=%d", conf.TTL))
|
||||
rw.Header().Set("Cache-Control", fmt.Sprintf("max-age=%d, public", conf.TTL))
|
||||
rw.Header().Set("Content-Type", mimes[po.format])
|
||||
if gzipped {
|
||||
rw.Header().Set("Content-Encoding", "gzip")
|
||||
|
Reference in New Issue
Block a user