diff --git a/http/home/home_routes.go b/http/home/home_routes.go index 3c3febc..c7e0053 100644 --- a/http/home/home_routes.go +++ b/http/home/home_routes.go @@ -13,6 +13,11 @@ func ConfigRoutes() { ctx.Output.Body([]byte("ok")) }) + // HEAD method may be used for health check such as aliyun SLB + beego.Head("/health", func(ctx *context.Context) { + ctx.Output.Body([]byte("")) + }) + beego.Get("/version", func(ctx *context.Context) { ctx.Output.Body([]byte(g.VERSION)) })