aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-04-20 20:14:21 +0800
committerGitHub <noreply@github.com>2017-04-20 20:14:21 +0800
commit42072783c910b6f4119bb410f0e9dd55ebfc0927 (patch)
treec8fe9a9a560379f31654cbaaba88ceb47500e22c /cmd/web.go
parentbb14c97d406e5ed49863c666897da890e600a3f3 (diff)
downloadgitea-42072783c910b6f4119bb410f0e9dd55ebfc0927.tar.gz
gitea-42072783c910b6f4119bb410f0e9dd55ebfc0927.zip
support health check via / and fix #969 (#1520)
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 6b7ec321d9..5346bd5e59 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) {