From ad22606a3da6893475f4d763e3c203c5b1bb2f58 Mon Sep 17 00:00:00 2001 From: Frederic Branczyk Date: Mon, 22 May 2017 14:15:02 +0200 Subject: [PATCH] web: prefix redirect with ExternalURL path --- web/web.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/web.go b/web/web.go index 7cac4effce..61398f0645 100644 --- a/web/web.go +++ b/web/web.go @@ -23,6 +23,7 @@ import ( "net/http" "net/url" "os" + "path" "path/filepath" "sort" "strings" @@ -170,7 +171,7 @@ func New(o *Options) *Handler { instrf := prometheus.InstrumentHandlerFunc router.Get("/", func(w http.ResponseWriter, r *http.Request) { - router.Redirect(w, r, "/graph", http.StatusFound) + router.Redirect(w, r, path.Join(o.ExternalURL.Path, "/graph"), http.StatusFound) }) router.Get("/alerts", instrf("alerts", h.alerts))