Skip to content

Commit 946aa5d

Browse files
committed
Add Content-Type to HTTP landing page.
Closes prometheus-community#154
1 parent 2148f35 commit 946aa5d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

postgres_exporter.go

+1
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,7 @@ func main() {
11081108

11091109
http.Handle(*metricPath, promhttp.Handler())
11101110
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
1111+
w.Header().Set("Content-Type", "Content-Type:text/plain; charset=UTF-8") // nolint: errcheck
11111112
w.Write(landingPage) // nolint: errcheck
11121113
})
11131114

0 commit comments

Comments
 (0)