1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00

Set cache-control: no-cache to heath response

This commit is contained in:
DarthSim 2022-12-11 19:03:04 +06:00
parent 79e473798d
commit 67cd992e12
2 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,8 @@
### Change
- Change `IMGPROXY_FORMAT_QUALITY` default value to `avif=65`.
- Change `IMGPROXY_AVIF_SPEED` default value to `8`.
- Change `IMGPROXY_PREFERRED_FORMATS` default value to `jpeg,png,gif`;
- Change `IMGPROXY_PREFERRED_FORMATS` default value to `jpeg,png,gif`.
- Set `Cache-Control: no-cache` header to the health check responses.
## [3.11.0] - 2022-11-17
### Add

View File

@ -166,6 +166,7 @@ func withPanicHandler(h router.RouteHandler) router.RouteHandler {
func handleHealth(reqID string, rw http.ResponseWriter, r *http.Request) {
router.LogResponse(reqID, r, 200, nil)
rw.Header().Set("Cache-Control", "no-cache")
rw.WriteHeader(200)
rw.Write(imgproxyIsRunningMsg)
}