Commit 799dce4b authored by Zou Nengren's avatar Zou Nengren Committed by Miek Gieben

redirect handler for pprof index (#3503)

Signed-off-by: default avatarzouyee <zounengren@cmss.chinamobile.com>
parent 25ef9b2d
...@@ -31,6 +31,9 @@ func (h *handler) Startup() error { ...@@ -31,6 +31,9 @@ func (h *handler) Startup() error {
h.ln = ln h.ln = ln
h.mux = http.NewServeMux() h.mux = http.NewServeMux()
h.mux.HandleFunc(path, func(rw http.ResponseWriter, req *http.Request) {
http.Redirect(rw, req, path+"/", http.StatusFound)
})
h.mux.HandleFunc(path+"/", pp.Index) h.mux.HandleFunc(path+"/", pp.Index)
h.mux.HandleFunc(path+"/cmdline", pp.Cmdline) h.mux.HandleFunc(path+"/cmdline", pp.Cmdline)
h.mux.HandleFunc(path+"/profile", pp.Profile) h.mux.HandleFunc(path+"/profile", pp.Profile)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment