mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-28 18:06:34 +02:00
debug: add pprof endpoints (#1504)
This commit is contained in:
parent
eb79cc0957
commit
4ed3d84632
1 changed files with 8 additions and 0 deletions
|
@ -3,6 +3,7 @@ package controlplane
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"net/http/pprof"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/handlers"
|
||||
|
@ -38,4 +39,11 @@ func (srv *Server) addHTTPMiddleware() {
|
|||
root.HandleFunc("/healthz", httputil.HealthCheck)
|
||||
root.HandleFunc("/ping", httputil.HealthCheck)
|
||||
root.PathPrefix("/.pomerium/assets/").Handler(http.StripPrefix("/.pomerium/assets/", frontend.MustAssetHandler()))
|
||||
|
||||
// pprof
|
||||
root.Path("/debug/pprof/cmdline").HandlerFunc(pprof.Cmdline)
|
||||
root.Path("/debug/pprof/profile").HandlerFunc(pprof.Profile)
|
||||
root.Path("/debug/pprof/symbol").HandlerFunc(pprof.Symbol)
|
||||
root.Path("/debug/pprof/trace").HandlerFunc(pprof.Trace)
|
||||
root.PathPrefix("/debug/pprof/").HandlerFunc(pprof.Index)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue