mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
add some docs for telemetry server
move pprof to the telemetry server only
This commit is contained in:
@@ -19,7 +19,7 @@ func GetHTTPRouter() http.Handler {
|
||||
return router
|
||||
}
|
||||
|
||||
func initializeRouter(staticFilesPath string, enableProfiler, enableWebAdmin bool) {
|
||||
func initializeRouter(staticFilesPath string, enableWebAdmin bool) {
|
||||
router = chi.NewRouter()
|
||||
|
||||
router.Group(func(r chi.Router) {
|
||||
@@ -34,12 +34,6 @@ func initializeRouter(staticFilesPath string, enableProfiler, enableWebAdmin boo
|
||||
router.Use(logger.NewStructuredLogger(logger.GetLogger()))
|
||||
router.Use(middleware.Recoverer)
|
||||
|
||||
if enableProfiler {
|
||||
logger.InfoToConsole("enabling the built-in profiler")
|
||||
logger.Info(logSender, "", "enabling the built-in profiler")
|
||||
router.Mount(pprofBasePath, middleware.Profiler())
|
||||
}
|
||||
|
||||
router.NotFound(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
sendAPIResponse(w, r, nil, "Not Found", http.StatusNotFound)
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user