diff --git a/app/vmagent/main.go b/app/vmagent/main.go
index 7d7635a10d..43552cf940 100644
--- a/app/vmagent/main.go
+++ b/app/vmagent/main.go
@@ -145,6 +145,9 @@ func main() {
func requestHandler(w http.ResponseWriter, r *http.Request) bool {
if r.URL.Path == "/" {
+ if r.Method != "GET" {
+ return false
+ }
fmt.Fprintf(w, "vmagent - see docs at https://victoriametrics.github.io/vmagent.html")
return true
}
diff --git a/app/vmalert/web.go b/app/vmalert/web.go
index a095356d97..8fc71359e6 100644
--- a/app/vmalert/web.go
+++ b/app/vmalert/web.go
@@ -29,6 +29,9 @@ var pathList = [][]string{
func (rh *requestHandler) handler(w http.ResponseWriter, r *http.Request) bool {
switch r.URL.Path {
case "/":
+ if r.Method != "GET" {
+ return false
+ }
for _, path := range pathList {
p, doc := path[0], path[1]
fmt.Fprintf(w, "%q - %s
", p, p, doc)
diff --git a/app/vminsert/main.go b/app/vminsert/main.go
index d82c597983..f0d2244af4 100644
--- a/app/vminsert/main.go
+++ b/app/vminsert/main.go
@@ -141,6 +141,9 @@ func main() {
func requestHandler(w http.ResponseWriter, r *http.Request) bool {
if r.URL.Path == "/" {
+ if r.Method != "GET" {
+ return false
+ }
fmt.Fprintf(w, "vminsert - a component of VictoriaMetrics cluster. See docs at https://victoriametrics.github.io/Cluster-VictoriaMetrics.html")
return true
}
diff --git a/app/vmselect/main.go b/app/vmselect/main.go
index 95f668bd83..445ce0df03 100644
--- a/app/vmselect/main.go
+++ b/app/vmselect/main.go
@@ -128,6 +128,9 @@ var (
func requestHandler(w http.ResponseWriter, r *http.Request) bool {
if r.URL.Path == "/" {
+ if r.Method != "GET" {
+ return false
+ }
fmt.Fprintf(w, "vmselect - a component of VictoriaMetrics cluster. See docs at https://victoriametrics.github.io/Cluster-VictoriaMetrics.html")
return true
}
diff --git a/app/vmstorage/main.go b/app/vmstorage/main.go
index 34e301c01b..4f7103f7e9 100644
--- a/app/vmstorage/main.go
+++ b/app/vmstorage/main.go
@@ -120,6 +120,9 @@ func main() {
func newRequestHandler(strg *storage.Storage) httpserver.RequestHandler {
return func(w http.ResponseWriter, r *http.Request) bool {
if r.URL.Path == "/" {
+ if r.Method != "GET" {
+ return false
+ }
fmt.Fprintf(w, "vmstorage - a component of VictoriaMetrics cluster. See docs at https://victoriametrics.github.io/Cluster-VictoriaMetrics.html")
return true
}