mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-10 20:22:31 +02:00
IMG-13: http.Header, *ImageData -> ImageData (#1473)
* ImageData.Headers() * *ImageData -> ImageData * withmatt -> httpheaders of our own * .Clone() headers, nil * NewFromBytesWithFormat -> nil * svg.go -> do not Clone()
This commit is contained in:
@@ -113,10 +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, po.Expires, map[string]string{
|
||||
"Cache-Control": res.Header.Get("Cache-Control"),
|
||||
"Expires": res.Header.Get("Expires"),
|
||||
})
|
||||
setCacheControl(rw, po.Expires, res.Header)
|
||||
setCanonical(rw, imageURL)
|
||||
rw.Header().Set("Content-Security-Policy", "script-src 'none'")
|
||||
|
||||
|
Reference in New Issue
Block a user