I need to enable pprof on Freddie, but don't want to expose the pprof http endpoints to the entire world. Unfortunately, net/http/pprof unconditionally registers its handlers with http.DefaultServeMux in its package init() function. So, we should use our own ServeMux for Freddie to work around this. (We should not be implicitly using DefaultServeMux anyway, regardless of pprof usage.)
I need to enable pprof on Freddie, but don't want to expose the pprof http endpoints to the entire world. Unfortunately,
net/http/pprof
unconditionally registers its handlers withhttp.DefaultServeMux
in its packageinit()
function. So, we should use our ownServeMux
for Freddie to work around this. (We should not be implicitly usingDefaultServeMux
anyway, regardless of pprof usage.)