Skip to content

Commit

Permalink
fix(meta): redirect /debug/pprof to avoid jumping to a blank page in …
Browse files Browse the repository at this point in the history
…meta service
  • Loading branch information
chengshiwen authored Sep 29, 2024
1 parent 99cdfdf commit 3bad527
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/meta/pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ func (h *handler) handleProfiles(w http.ResponseWriter, r *http.Request) {
httppprof.Symbol(w, r)
case "/debug/pprof/all":
h.archiveProfiles(w, r)
case "/debug/pprof":
// Redirect to /debug/pprof/ to avoid jumping to a blank page
// after clicking the links on the /debug/pprof webpage.
http.Redirect(w, r, "/debug/pprof/", http.StatusFound)
default:
httppprof.Index(w, r)
}
Expand Down

0 comments on commit 3bad527

Please sign in to comment.