Bring back default redirect for profiling.
Now that the RPC server uses its own mux, bring back the code which does the automatic 303 redirect for the root of the profile server.
This commit is contained in:
parent
5a4772bdc6
commit
2bb8c5d5cc
1 changed files with 3 additions and 0 deletions
3
btcd.go
3
btcd.go
|
@ -48,6 +48,9 @@ func btcdMain() error {
|
||||||
go func() {
|
go func() {
|
||||||
listenAddr := net.JoinHostPort("", cfg.Profile)
|
listenAddr := net.JoinHostPort("", cfg.Profile)
|
||||||
log.Infof("Profile server listening on %s", listenAddr)
|
log.Infof("Profile server listening on %s", listenAddr)
|
||||||
|
profileRedirect := http.RedirectHandler("/debug/pprof",
|
||||||
|
http.StatusSeeOther)
|
||||||
|
http.Handle("/", profileRedirect)
|
||||||
log.Errorf("%v", http.ListenAndServe(listenAddr, nil))
|
log.Errorf("%v", http.ListenAndServe(listenAddr, nil))
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue