From df954ddf9df2fffd067335d432d801bc1020ad16 Mon Sep 17 00:00:00 2001 From: Calle Pettersson Date: Mon, 2 Mar 2020 20:20:02 +0100 Subject: [PATCH] Remove redirect from unknown paths to /metrics --- exporter.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/exporter.go b/exporter.go index 70226cfb8..5c7ecca72 100644 --- a/exporter.go +++ b/exporter.go @@ -335,7 +335,13 @@ func main() { http.Handle(*metricsPath, h) http.HandleFunc("/health", healthCheck) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - http.Redirect(w, r, *metricsPath, http.StatusMovedPermanently) + _, _ = w.Write([]byte(` +WMI Exporter + +

WMI Exporter

+

Metrics

+ +`)) }) log.Infoln("Starting WMI exporter", version.Info())