Removes debug from golang (#1875)
This commit is contained in:
1
main.go
1
main.go
@@ -5,7 +5,6 @@ import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
"os"
|
||||
"os/signal"
|
||||
"strings"
|
||||
|
||||
@@ -63,10 +63,6 @@ func createRouter(h *handler) *mux.Router {
|
||||
s.Handle("/version", authorizationRequired(h.version))
|
||||
s.HandleFunc("/healthcheck", h.healthcheck)
|
||||
|
||||
if log.IsLevelEnabled(log.DebugLevel) {
|
||||
s.PathPrefix("/debug/pprof/").Handler(http.DefaultServeMux)
|
||||
}
|
||||
|
||||
if base != "/" {
|
||||
s.PathPrefix("/").Handler(http.StripPrefix(base+"/", http.HandlerFunc(h.index)))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user