From b0b0ab574d4301663e9c9339573b8b01ee205471 Mon Sep 17 00:00:00 2001 From: Agustin Mendez Date: Sun, 31 Jan 2021 23:45:32 -0300 Subject: [PATCH] fix: metrics were not working --- controller/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/controller.go b/controller/controller.go index 5e6bbb85..726a85b8 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -60,10 +60,10 @@ func CreateRouter(cfg *config.Config) *mux.Router { router.HandleFunc("/api/v1/statuses/{key}", secureIfNecessary(cfg, GzipHandlerFunc(serviceStatusHandler))).Methods("GET") router.HandleFunc("/api/v1/badges/uptime/{duration}/{identifier}", badgeHandler).Methods("GET") router.HandleFunc("/health", healthHandler).Methods("GET") - router.PathPrefix("/").Handler(GzipHandler(http.FileServer(http.Dir("./web/static")))) if cfg.Metrics { router.Handle("/metrics", promhttp.Handler()).Methods("GET") } + router.PathPrefix("/").Handler(GzipHandler(http.FileServer(http.Dir("./web/static")))) return router }