fix: remove unauthenticated pprof routes
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
|||||||
"mal/internal/config"
|
"mal/internal/config"
|
||||||
"mal/internal/observability"
|
"mal/internal/observability"
|
||||||
"net/http"
|
"net/http"
|
||||||
_ "net/http/pprof" // register pprof handlers on http.DefaultServeMux
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@@ -39,8 +38,6 @@ func ProvideRouter(cfg config.Config, htmlRender render.HTMLRender) *gin.Engine
|
|||||||
})
|
})
|
||||||
r.Static("/static", "./static")
|
r.Static("/static", "./static")
|
||||||
r.Static("/dist", "./dist")
|
r.Static("/dist", "./dist")
|
||||||
r.GET("/debug/pprof", gin.WrapH(http.DefaultServeMux))
|
|
||||||
r.GET("/debug/pprof/*action", gin.WrapH(http.DefaultServeMux))
|
|
||||||
r.HTMLRender = htmlRender
|
r.HTMLRender = htmlRender
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user