Commit 3a772c7f by bergquist

allows head requests for /api/health endpoint

closes #9955
parent 43a6a65f
......@@ -194,7 +194,8 @@ func (hs *HttpServer) metricsEndpoint(ctx *macaron.Context) {
}
func (hs *HttpServer) healthHandler(ctx *macaron.Context) {
if ctx.Req.Method != "GET" || ctx.Req.URL.Path != "/api/health" {
notHeadOrGet := ctx.Req.Method != http.MethodGet && ctx.Req.Method != http.MethodHead
if notHeadOrGet || ctx.Req.URL.Path != "/api/health" {
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment