From da2499d5a5de661292de129832aef67dfbc42385 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Wed, 26 Aug 2015 17:42:25 +0200 Subject: [PATCH] Add POST handler for /debug to fix CPU profiling. `go tool pprof` sends a POST request to enable CPU profiling, so we also need to handle that method. --- web/web.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/web.go b/web/web.go index 3412a576a..9f2884016 100644 --- a/web/web.go +++ b/web/web.go @@ -176,7 +176,9 @@ func New(st local.Storage, qe *promql.Engine, rm *rules.Manager, status *Prometh } router.Post("/-/reload", h.reload) + router.Get("/debug/*subpath", http.DefaultServeMux.ServeHTTP) + router.Post("/debug/*subpath", http.DefaultServeMux.ServeHTTP) return h }