From bc0c0d4ea1d2dc36a696ada0b460b946044f165f Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 3 Nov 2015 10:28:56 -0800 Subject: [PATCH] health check will never be able to get auth token so remove RootHandler wrapper Signed-off-by: David Lawrence (github: endophage) --- server/server.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/server.go b/server/server.go index 66935da786..ca56f359c3 100644 --- a/server/server.go +++ b/server/server.go @@ -105,11 +105,8 @@ func RootHandler(ac auth.AccessController, ctx context.Context, trust signed.Cry prometheus.InstrumentHandlerWithOpts( prometheusOpts("DeleteTuf"), hand(handlers.DeleteHandler, "push", "pull"))) - r.Methods("GET").Path("/_notary_server/health").Handler(hand( - func(ctx context.Context, w http.ResponseWriter, r *http.Request) error { - health.StatusHandler(w, r) - return nil - })) + + r.Methods("GET").Path("/_notary_server/health").HandlerFunc(health.StatusHandler) r.Methods("GET").Path("/_notary_server/metrics").Handler(prometheus.Handler()) r.Methods("GET", "POST", "PUT", "HEAD", "DELETE").Path("/{other:.*}").Handler(hand(utils.NotFoundHandler))