mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
vmselect: cover special cases for vmalert's routing in cluster version (#2844)
* vmselect: cover special cases for vmalert's routing * remove trailing `/` from requests * redirect to vmalert's home page when `/vmalert` is requested. Signed-off-by: hagen1778 <roman@victoriametrics.com> * vmselect: fix review comments Signed-off-by: hagen1778 <roman@victoriametrics.com> * Update app/vmselect/main.go Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
This commit is contained in:
parent
eab8ebbe11
commit
6dda254e01
@ -341,7 +341,11 @@ func selectHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseW
|
||||
return true
|
||||
}
|
||||
|
||||
if strings.HasPrefix(p.Suffix, "prometheus/vmalert") {
|
||||
if p.Suffix == "prometheus/vmalert" {
|
||||
http.Redirect(w, r, r.URL.Path+"/", http.StatusMovedPermanently)
|
||||
return true
|
||||
}
|
||||
if strings.HasPrefix(p.Suffix, "prometheus/vmalert/") {
|
||||
vmalertRequests.Inc()
|
||||
if len(*vmalertProxyURL) == 0 {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
|
Loading…
Reference in New Issue
Block a user