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