mirror of
https://github.com/prometheus/prometheus.git
synced 2025-12-06 18:11:21 +01:00
Merge pull request #17389 from prometheus/fix-revert-route-prefix-change
Revert "UI: fix redirect when web.routePrefix configured"
This commit is contained in:
commit
0d527b07d7
@ -417,12 +417,12 @@ func New(logger *slog.Logger, o *Options) *Handler {
|
||||
readyf := h.testReady
|
||||
|
||||
router.Get("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, path.Join(o.RoutePrefix, homePage), http.StatusFound)
|
||||
http.Redirect(w, r, path.Join(o.ExternalURL.Path, homePage), http.StatusFound)
|
||||
})
|
||||
|
||||
if !o.UseOldUI {
|
||||
router.Get("/graph", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, path.Join(o.RoutePrefix, "/query?"+r.URL.RawQuery), http.StatusFound)
|
||||
http.Redirect(w, r, path.Join(o.ExternalURL.Path, "/query?"+r.URL.RawQuery), http.StatusFound)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user