mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 16:30:55 +01:00
app/vmalert: fix after da10962d4c
This commit is contained in:
parent
da10962d4c
commit
764fc04756
@ -344,11 +344,12 @@ func selectHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseW
|
||||
return true
|
||||
}
|
||||
|
||||
if path == "/vmalert" {
|
||||
http.Redirect(w, r, path+"/", http.StatusMovedPermanently)
|
||||
if p.Suffix == "prometheus/vmalert" {
|
||||
path := "../" + p.Suffix + "/"
|
||||
http.Redirect(w, r, path, http.StatusMovedPermanently)
|
||||
return true
|
||||
}
|
||||
if strings.HasPrefix(path, "/vmalert/") {
|
||||
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