feat: ping api (close #3752)

This commit is contained in:
Andy Hsu 2023-03-07 19:05:52 +08:00
parent 00ff0a43a7
commit ebcbb29a0f

View File

@ -21,6 +21,9 @@ func Init(e *gin.Engine) {
} }
Cors(e) Cors(e)
g := e.Group(conf.URL.Path) g := e.Group(conf.URL.Path)
g.Any("/ping", func(c *gin.Context) {
c.String(200, "pong")
})
common.SecretKey = []byte(conf.Conf.JwtSecret) common.SecretKey = []byte(conf.Conf.JwtSecret)
g.Use(middlewares.StoragesLoaded) g.Use(middlewares.StoragesLoaded)
if conf.Conf.MaxConnections > 0 { if conf.Conf.MaxConnections > 0 {