diff --git a/cmd/profile.go b/cmd/profile.go index 90bec5c..de7a8ee 100644 --- a/cmd/profile.go +++ b/cmd/profile.go @@ -8,6 +8,7 @@ import ( "fmt" "net/http" "net/http/pprof" + "strings" "time" "github.com/julienschmidt/httprouter" @@ -16,6 +17,10 @@ import ( func registerProfileHandler(mux *httprouter.Router, verb, path string, handler http.HandlerFunc) { mux.HandlerFunc(verb, path, handler) + if Redact && AdminPrefix != "" { + path = strings.ReplaceAll(path, AdminPrefix, "/") + } + if Handlers { fmt.Printf("%s | SERVE: Registered handler for %s\n", time.Now().Format(logDate), diff --git a/cmd/root.go b/cmd/root.go index c38f426..3fab6aa 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -17,7 +17,7 @@ import ( const ( AllowedCharacters string = `^[A-z0-9.\-_]+$` - ReleaseVersion string = "4.0.1" + ReleaseVersion string = "4.0.2" ) var (