IMGPROXY_HEALTH_CHECK_PATH config

This commit is contained in:
DarthSim
2022-02-21 18:06:20 +06:00
parent 377946d5af
commit df818706c2
4 changed files with 12 additions and 1 deletions

View File

@@ -29,6 +29,9 @@ func buildRouter() *router.Router {
r.GET("/", handleLanding, true)
r.GET("/health", handleHealth, true)
if len(config.HealthCheckPath) > 0 {
r.GET(config.HealthCheckPath, handleHealth, true)
}
r.GET("/favicon.ico", handleFavicon, true)
r.GET("/", withMetrics(withPanicHandler(withCORS(withSecret(handleProcessing)))), false)
r.HEAD("/", withCORS(handleHead), false)