lib/api: Fix debug endpoints (ref #7001) (#7092)

This commit is contained in:
Simon Frei 2020-11-06 14:21:37 +01:00 committed by GitHub
parent 33185fdeb5
commit a08a1b6998
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,7 +323,7 @@ func (s *service) serve(ctx context.Context) {
debugMux.HandleFunc("/rest/debug/cpuprof", s.getCPUProf) // duration debugMux.HandleFunc("/rest/debug/cpuprof", s.getCPUProf) // duration
debugMux.HandleFunc("/rest/debug/heapprof", s.getHeapProf) debugMux.HandleFunc("/rest/debug/heapprof", s.getHeapProf)
debugMux.HandleFunc("/rest/debug/support", s.getSupportBundle) debugMux.HandleFunc("/rest/debug/support", s.getSupportBundle)
restMux.Handler(http.MethodGet, "/rest/debug/", s.whenDebugging(debugMux)) restMux.Handler(http.MethodGet, "/rest/debug/*method", s.whenDebugging(debugMux))
// A handler that disables caching // A handler that disables caching
noCacheRestMux := noCacheMiddleware(metricsMiddleware(restMux)) noCacheRestMux := noCacheMiddleware(metricsMiddleware(restMux))