mirror of https://github.com/Xhofe/alist
fix: disable pprof while not debug
parent
87e339850d
commit
39b8f28fc4
|
@ -50,7 +50,7 @@ func Static(r *gin.Engine) {
|
||||||
c.Status(200)
|
c.Status(200)
|
||||||
if strings.HasPrefix(c.Request.URL.Path, "/@manage") {
|
if strings.HasPrefix(c.Request.URL.Path, "/@manage") {
|
||||||
_, _ = c.Writer.WriteString(conf.ManageHtml)
|
_, _ = c.Writer.WriteString(conf.ManageHtml)
|
||||||
} else if strings.HasPrefix(c.Request.URL.Path, "/debug/pprof") {
|
} else if strings.HasPrefix(c.Request.URL.Path, "/debug/pprof") && conf.Debug {
|
||||||
pprof.Index(c.Writer, c.Request)
|
pprof.Index(c.Writer, c.Request)
|
||||||
} else {
|
} else {
|
||||||
_, _ = c.Writer.WriteString(conf.IndexHtml)
|
_, _ = c.Writer.WriteString(conf.IndexHtml)
|
||||||
|
|
Loading…
Reference in New Issue