Skip to content

Commit dbc4dca

Browse files
committed
Require authentication for pprof routes
If people have Golbat fully accessible to anyone, the pprof routes could possibly be abused. Put them behind authentication.
1 parent 0dbebcd commit dbc4dca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func main() {
278278
apiGroup.GET("/devices/all", GetDevices)
279279

280280
debugGroup := r.Group("/debug")
281-
pprofGroup := debugGroup.Group("/pprof")
281+
pprofGroup := debugGroup.Group("/pprof", AuthRequired())
282282
pprofGroup.GET("/cmdline", func(c *gin.Context) {
283283
pprof.Cmdline(c.Writer, c.Request)
284284
})

0 commit comments

Comments
 (0)