Make the expires option set Expires and Cache-Control headers

This commit is contained in:
DarthSim
2023-02-24 19:44:03 +03:00
parent 41b9cfbc6e
commit 50d04d585e
4 changed files with 18 additions and 4 deletions

View File

@@ -113,7 +113,7 @@ func streamOriginImage(ctx context.Context, reqID string, r *http.Request, rw ht
rw.Header().Set("Content-Disposition", imagetype.ContentDisposition(filename, ext, po.ReturnAttachment))
}
setCacheControl(rw, map[string]string{
setCacheControl(rw, po.Expires, map[string]string{
"Cache-Control": rw.Header().Get("Cache-Control"),
"Expires": rw.Header().Get("Expires"),
})