(g *gin.RouterGroup)
| 17 | } |
| 18 | |
| 19 | func debug(g *gin.RouterGroup) { |
| 20 | g.GET("/path/*path", middlewares.Down(sign.Verify), func(c *gin.Context) { |
| 21 | rawPath := c.Request.Context().Value(conf.PathKey).(string) |
| 22 | c.JSON(200, gin.H{ |
| 23 | "path": rawPath, |
| 24 | }) |
| 25 | }) |
| 26 | g.GET("/hide_privacy", func(c *gin.Context) { |
| 27 | common.ErrorStrResp(c, "This is ip: 1.1.1.1", 400) |
| 28 | }) |
| 29 | g.GET("/gc", func(c *gin.Context) { |
| 30 | runtime.GC() |
| 31 | c.String(http.StatusOK, "ok") |
| 32 | }) |
| 33 | _pprof(g.Group("/pprof")) |
| 34 | } |