Documentation
¶
Overview ¶
Package pprofsrv runs the opt-in net/http/pprof listener. Profiling endpoints are unauthenticated and can leak memory contents, so the listener is off by default, lives on its own mux and port (never DefaultServeMux or the main server mux), and refuses non-loopback addresses unless the operator explicitly overrides the guard. See docs/security/runtime-hardening.md.
Index ¶
Constants ¶
const ( EnvAddr = "CONSOLE_PPROF_ADDR" EnvAllowRemote = "CONSOLE_PPROF_ALLOW_REMOTE" )
Environment variables controlling the listener.
Variables ¶
This section is empty.
Functions ¶
func CheckAddr ¶
CheckAddr returns an error unless addr is a host:port bound to loopback ("localhost" or a loopback IP literal). Hostnames other than "localhost" are refused rather than resolved, and an empty host (":6060") means all interfaces and is refused.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a running pprof listener.