Merge pull request #473 from martinlindhe/remove-redirect
BREAKING: Remove redirect from unknown paths to /metrics
This commit is contained in:
commit
1d7747b4d1
|
@ -339,7 +339,13 @@ func main() {
|
|||
http.HandleFunc(*metricsPath, withConcurrencyLimit(*maxRequests, h.ServeHTTP))
|
||||
http.HandleFunc("/health", healthCheck)
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, *metricsPath, http.StatusMovedPermanently)
|
||||
_, _ = w.Write([]byte(`<html>
|
||||
<head><title>WMI Exporter</title></head>
|
||||
<body>
|
||||
<h1>WMI Exporter</h1>
|
||||
<p><a href="` + *metricsPath + `">Metrics</a></p>
|
||||
</body>
|
||||
</html>`))
|
||||
})
|
||||
|
||||
log.Infoln("Starting WMI exporter", version.Info())
|
||||
|
|
Loading…
Reference in New Issue