From a257c5fe534f6340817614da27f8be4f968c462e Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin <valyala@victoriametrics.com>
Date: Tue, 6 Dec 2022 20:58:16 -0800
Subject: [PATCH] app/vmselect: typo fixes in code comments

---
 app/vmselect/main.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/vmselect/main.go b/app/vmselect/main.go
index 334be50745..56a31a5d48 100644
--- a/app/vmselect/main.go
+++ b/app/vmselect/main.go
@@ -364,6 +364,9 @@ func selectHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseW
 	}
 
 	if p.Suffix == "prometheus/vmalert" {
+		// vmalert access via incomplete url without `/` in the end. Redirect to complete url.
+		// Use relative redirect, since the hostname and path prefix may be incorrect if VictoriaMetrics
+		// is hidden behind vmauth or similar proxy.
 		path := "../" + p.Suffix + "/"
 		httpserver.Redirect(w, path)
 		return true