mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-01-18 11:12:10 +02:00
Don't set Content-DPR header
This commit is contained in:
parent
85fb470704
commit
c98752651a
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
### Remove
|
### Remove
|
||||||
- Remove suport for `Viewport-Width` client hint.
|
- Remove suport for `Viewport-Width` client hint.
|
||||||
|
- Don't set `Content-DPR` header (deprecated in the specification).
|
||||||
|
|
||||||
## [3.15.0] - 2023-04-10
|
## [3.15.0] - 2023-04-10
|
||||||
### Add
|
### Add
|
||||||
|
@ -137,8 +137,6 @@ Can be combined with `width` and `height` options. In this case, imgproxy calcul
|
|||||||
|
|
||||||
**📝 Note:** Unlike the `dpr` option, the `zoom` option doesn't affect gravities offsets, watermark offsets, and paddings.
|
**📝 Note:** Unlike the `dpr` option, the `zoom` option doesn't affect gravities offsets, watermark offsets, and paddings.
|
||||||
|
|
||||||
**📝 Note:** Unlike [dpr](#dpr), `zoom` doesn't set the `Content-DPR` header in the response.
|
|
||||||
|
|
||||||
Default: `1`
|
Default: `1`
|
||||||
|
|
||||||
### Dpr
|
### Dpr
|
||||||
@ -151,8 +149,6 @@ When set, imgproxy will multiply the image dimensions according to this factor f
|
|||||||
|
|
||||||
**📝 Note:** The `dpr` option affects gravities offsets, watermark offsets, and paddings to make the resulting image structures with and without the `dpr` option applied match.
|
**📝 Note:** The `dpr` option affects gravities offsets, watermark offsets, and paddings to make the resulting image structures with and without the `dpr` option applied match.
|
||||||
|
|
||||||
**📝 Note:** `dpr` also sets the `Content-DPR` header in the response so the browser can correctly render the image.
|
|
||||||
|
|
||||||
Default: `1`
|
Default: `1`
|
||||||
|
|
||||||
### Enlarge
|
### Enlarge
|
||||||
|
@ -117,10 +117,6 @@ func respondWithImage(reqID string, r *http.Request, rw http.ResponseWriter, sta
|
|||||||
rw.Header().Set("Content-Type", resultData.Type.Mime())
|
rw.Header().Set("Content-Type", resultData.Type.Mime())
|
||||||
rw.Header().Set("Content-Disposition", contentDisposition)
|
rw.Header().Set("Content-Disposition", contentDisposition)
|
||||||
|
|
||||||
if po.Dpr != 1 {
|
|
||||||
rw.Header().Set("Content-DPR", strconv.FormatFloat(po.Dpr, 'f', 2, 32))
|
|
||||||
}
|
|
||||||
|
|
||||||
setCacheControl(rw, po.Expires, originData.Headers)
|
setCacheControl(rw, po.Expires, originData.Headers)
|
||||||
setVary(rw)
|
setVary(rw)
|
||||||
setCanonical(rw, originURL)
|
setCanonical(rw, originURL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user