From 869bea216373aafd86bd99ee965d409718dcd152 Mon Sep 17 00:00:00 2001 From: wenjianzhang Date: Wed, 16 Jun 2021 18:33:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor=F0=9F=8E=A8=EF=BC=9A=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/other/router/monitor.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/other/router/monitor.go b/app/other/router/monitor.go index 29a20593..cdbe7ad4 100644 --- a/app/other/router/monitor.go +++ b/app/other/router/monitor.go @@ -1,7 +1,6 @@ package router import ( - "github.com/go-admin-team/go-admin-core/sdk/config" "net/http" "github.com/gin-gonic/gin" @@ -15,11 +14,10 @@ func init() { // 需认证的路由代码 func registerMonitorRouter(v1 *gin.RouterGroup) { - if config.ApplicationConfig.Mode == "dev" { - v1.GET("/metrics", transfer.Handler(promhttp.Handler())) - //健康检查 - v1.GET("/health", func(c *gin.Context) { - c.Status(http.StatusOK) - }) - } -} + v1.GET("/metrics", transfer.Handler(promhttp.Handler())) + //健康检查 + v1.GET("/health", func(c *gin.Context) { + c.Status(http.StatusOK) + }) + +} \ No newline at end of file