From 42072783c910b6f4119bb410f0e9dd55ebfc0927 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 20 Apr 2017 20:14:21 +0800 Subject: [PATCH] support health check via / and fix #969 (#1520) --- cmd/web.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/web.go b/cmd/web.go index 6b7ec321d..5346bd5e5 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -186,6 +186,10 @@ func runWeb(ctx *cli.Context) error { // FIXME: not all routes need go through same middlewares. // Especially some AJAX requests, we can reduce middleware number to improve performance. // Routers. + // for health check + m.Head("/", func() string { + return "" + }) m.Get("/", ignSignIn, routers.Home) m.Group("/explore", func() { m.Get("", func(ctx *context.Context) {