mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
redirect handler for pprof index (#3503)
Signed-off-by: zouyee <zounengren@cmss.chinamobile.com>
This commit is contained in:
@@ -31,6 +31,9 @@ func (h *handler) Startup() error {
|
||||
h.ln = ln
|
||||
|
||||
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+"/cmdline", pp.Cmdline)
|
||||
h.mux.HandleFunc(path+"/profile", pp.Profile)
|
||||
|
||||
Reference in New Issue
Block a user