From 93887a9b82a71613067ff0706248c18fe131c5b0 Mon Sep 17 00:00:00 2001 From: Mara Sophie Grosch Date: Mon, 29 Sep 2025 15:55:04 +0300 Subject: [PATCH] UI: fix redirect when web.routePrefix configured Signed-off-by: Mara Sophie Grosch --- web/web.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/web.go b/web/web.go index 80aa845883..22a0098878 100644 --- a/web/web.go +++ b/web/web.go @@ -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.ExternalURL.Path, homePage), http.StatusFound) + http.Redirect(w, r, path.Join(o.RoutePrefix, homePage), http.StatusFound) }) if !o.UseOldUI { router.Get("/graph", func(w http.ResponseWriter, r *http.Request) { - http.Redirect(w, r, path.Join(o.ExternalURL.Path, "/query?"+r.URL.RawQuery), http.StatusFound) + http.Redirect(w, r, path.Join(o.RoutePrefix, "/query?"+r.URL.RawQuery), http.StatusFound) }) }