mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 16:59:57 +00:00
TUN-7550: Add pprof endpoint to management service
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/pprof"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -74,6 +75,10 @@ func New(managementHostname string,
|
||||
r.Head("/ping", ping)
|
||||
r.Get("/logs", s.logs)
|
||||
r.Get("/metrics", s.metricsHandler.ServeHTTP)
|
||||
|
||||
// Supports only heap and goroutine
|
||||
r.Get("/debug/pprof/{profile:heap|goroutine}", pprof.Index)
|
||||
|
||||
r.Route("/host_details", func(r chi.Router) {
|
||||
// CORS middleware required to allow dash to access management.argotunnel.com requests
|
||||
r.Use(cors.Handler(cors.Options{
|
||||
|
Reference in New Issue
Block a user