From 9684a7ce2c3b3dee3ba3be2a3652639af87b2f12 Mon Sep 17 00:00:00 2001 From: qydysky Date: Wed, 15 May 2024 16:01:30 +0000 Subject: [PATCH] =?utf8?q?Fix=20=E4=BF=AE=E5=A4=8Dpprof=E5=B7=A5=E5=85=B7?= =?utf8?q?=E6=97=A0=E6=B3=95=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Reply/F.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Reply/F.go b/Reply/F.go index d04d2bc..8e9b9c2 100644 --- a/Reply/F.go +++ b/Reply/F.go @@ -1142,31 +1142,31 @@ func init() { // debug模式 if de, ok := c.C.K_v.LoadV(`debug模式`).(bool); ok && de { c.C.SerF.Store("/debug/pprof/", func(w http.ResponseWriter, r *http.Request) { - if c.DefaultHttpCheck(c.C, w, r, http.MethodGet) { + if c.DefaultHttpCheck(c.C, w, r, http.MethodGet, http.MethodPost) { return } pprof.Index(w, r) }) c.C.SerF.Store("/debug/pprof/cmdline", func(w http.ResponseWriter, r *http.Request) { - if c.DefaultHttpCheck(c.C, w, r, http.MethodGet) { + if c.DefaultHttpCheck(c.C, w, r, http.MethodGet, http.MethodPost) { return } pprof.Cmdline(w, r) }) c.C.SerF.Store("/debug/pprof/profile", func(w http.ResponseWriter, r *http.Request) { - if c.DefaultHttpCheck(c.C, w, r, http.MethodGet) { + if c.DefaultHttpCheck(c.C, w, r, http.MethodGet, http.MethodPost) { return } pprof.Profile(w, r) }) c.C.SerF.Store("/debug/pprof/symbol", func(w http.ResponseWriter, r *http.Request) { - if c.DefaultHttpCheck(c.C, w, r, http.MethodGet) { + if c.DefaultHttpCheck(c.C, w, r, http.MethodGet, http.MethodPost) { return } pprof.Symbol(w, r) }) c.C.SerF.Store("/debug/pprof/trace", func(w http.ResponseWriter, r *http.Request) { - if c.DefaultHttpCheck(c.C, w, r, http.MethodGet) { + if c.DefaultHttpCheck(c.C, w, r, http.MethodGet, http.MethodPost) { return } pprof.Trace(w, r) -- 2.39.2