mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 13:49:53 +05:00
Added check for httprof_path
This commit is contained in:
committed by
Dan Christian Bogos
parent
491be710d5
commit
7f98299b73
@@ -203,6 +203,9 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (s *Server) RegisterProfiler(addr string) {
|
||||
if addr[len(addr)-1] != '/' {
|
||||
addr = addr + "/"
|
||||
}
|
||||
s.httpMux.HandleFunc(addr, pprof.Index)
|
||||
s.httpMux.HandleFunc(addr+"cmdline", pprof.Cmdline)
|
||||
s.httpMux.HandleFunc(addr+"profile", pprof.Profile)
|
||||
|
||||
Reference in New Issue
Block a user