mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-11 04:32:29 +02:00
Fix X-Origin-Content-Length
header value when SVG is sanitized or minified
This commit is contained in:
@@ -4,6 +4,9 @@
|
|||||||
### Changed
|
### Changed
|
||||||
- (docker) Optimized image quantization.
|
- (docker) Optimized image quantization.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fix `X-Origin-Content-Length` header value when SVG is sanitized or minified.
|
||||||
|
|
||||||
## [3.28.0] - 2025-03-31
|
## [3.28.0] - 2025-03-31
|
||||||
### Added
|
### Added
|
||||||
- Add [IMGPROXY_BASE64_URL_INCLUDES_FILENAME](https://docs.imgproxy.net/latest/configuration/options#IMGPROXY_BASE64_URL_INCLUDES_FILENAME) config.
|
- Add [IMGPROXY_BASE64_URL_INCLUDES_FILENAME](https://docs.imgproxy.net/latest/configuration/options#IMGPROXY_BASE64_URL_INCLUDES_FILENAME) config.
|
||||||
|
@@ -406,12 +406,10 @@ func handleProcessing(reqID string, rw http.ResponseWriter, r *http.Request) {
|
|||||||
sanitized, svgErr := svg.Sanitize(originData)
|
sanitized, svgErr := svg.Sanitize(originData)
|
||||||
checkErr(ctx, "svg_processing", svgErr)
|
checkErr(ctx, "svg_processing", svgErr)
|
||||||
|
|
||||||
// Since we'll replace origin data, it's better to close it to return
|
defer sanitized.Close()
|
||||||
// it's buffer to the pool
|
|
||||||
originData.Close()
|
|
||||||
|
|
||||||
originData = sanitized
|
|
||||||
|
|
||||||
|
respondWithImage(reqID, r, rw, statusCode, sanitized, po, imageURL, originData)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
respondWithImage(reqID, r, rw, statusCode, originData, po, imageURL, originData)
|
respondWithImage(reqID, r, rw, statusCode, originData, po, imageURL, originData)
|
||||||
|
Reference in New Issue
Block a user