mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
Revert "app/vmselect: expose vmui at /select/<accountID>/prometheus/vmui additionally to /select/<accountID>/vmui"
This reverts commit 885a79def6799f288e14df05b35a12569659ab85. Reason for revert: Grafana doesn't allows accessing /select/<accountID>/prometheus/vmui :(
This commit is contained in:
parent
ddaa12050d
commit
f5fa177141
@ -239,14 +239,9 @@ func selectHandler(startTime time.Time, w http.ResponseWriter, r *http.Request,
|
||||
httpRequests.Get(at).Inc()
|
||||
httpRequestsDuration.Get(at).Add(int(time.Since(startTime).Milliseconds()))
|
||||
}()
|
||||
// Expose vmui at /select/<accountID>/vmui and at /select/<accountID>/prometheus/vmui .
|
||||
// The /select/<accountID>/prometheus/vmui is needed for server-side Prometheus datasource in Grafana.
|
||||
if strings.HasPrefix(p.Suffix, "vmui") || strings.HasPrefix(p.Suffix, "prometheus/vmui") {
|
||||
if strings.HasPrefix(p.Suffix, "vmui") {
|
||||
// vmui access.
|
||||
prefix := strings.Join([]string{"", p.Prefix, p.AuthToken}, "/")
|
||||
if strings.HasPrefix(p.Suffix, "prometheus/") {
|
||||
prefix += "/prometheus"
|
||||
}
|
||||
http.StripPrefix(prefix, vmuiFileServer).ServeHTTP(w, r)
|
||||
return true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user