mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 07:19:17 +01:00
cluster: standardize default HTTP responses (#4368)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
parent
6c84b61893
commit
576e59d82c
@ -192,7 +192,10 @@ func requestHandler(w http.ResponseWriter, r *http.Request) bool {
|
||||
if r.Method != http.MethodGet {
|
||||
return false
|
||||
}
|
||||
fmt.Fprintf(w, "vminsert - a component of VictoriaMetrics cluster. See docs at https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html")
|
||||
w.Header().Add("Content-Type", "text/html; charset=utf-8")
|
||||
fmt.Fprintf(w, `vminsert - a component of VictoriaMetrics cluster<br/>
|
||||
<a href="https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html">docs</a><br>
|
||||
`)
|
||||
return true
|
||||
}
|
||||
p, err := httpserver.ParsePath(r.URL.Path)
|
||||
|
@ -182,6 +182,7 @@ func requestHandler(w http.ResponseWriter, r *http.Request) bool {
|
||||
if r.Method != http.MethodGet {
|
||||
return false
|
||||
}
|
||||
w.Header().Add("Content-Type", "text/html; charset=utf-8")
|
||||
fmt.Fprintf(w, `vmselect - a component of VictoriaMetrics cluster<br/>
|
||||
<a href="https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html">docs</a><br>
|
||||
`)
|
||||
|
@ -163,7 +163,10 @@ func newRequestHandler(strg *storage.Storage) httpserver.RequestHandler {
|
||||
if r.Method != http.MethodGet {
|
||||
return false
|
||||
}
|
||||
fmt.Fprintf(w, "vmstorage - a component of VictoriaMetrics cluster. See docs at https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html")
|
||||
w.Header().Add("Content-Type", "text/html; charset=utf-8")
|
||||
fmt.Fprintf(w, `vmstorage - a component of VictoriaMetrics cluster<br/>
|
||||
<a href="https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html">docs</a><br>
|
||||
`)
|
||||
return true
|
||||
}
|
||||
return requestHandler(w, r, strg)
|
||||
|
Loading…
Reference in New Issue
Block a user