getlantern / browsersunbounded

Interoperable browser-based P2P proxies for censorship circumvention
GNU General Public License v3.0
6 stars 0 forks source link

[freddie] Don't use the default ServeMux #210

Closed Crosse closed 7 months ago

Crosse commented 7 months ago

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.)