Merge pull request #2832 from brancz/fix-redirect

web: fix double prefix redirect
This commit is contained in:
Fabian Reinartz 2017-06-12 10:40:43 +02:00 committed by GitHub
commit f71d39a053

View file

@ -171,7 +171,7 @@ func New(o *Options) *Handler {
instrf := prometheus.InstrumentHandlerFunc instrf := prometheus.InstrumentHandlerFunc
router.Get("/", func(w http.ResponseWriter, r *http.Request) { router.Get("/", func(w http.ResponseWriter, r *http.Request) {
router.Redirect(w, r, path.Join(o.ExternalURL.Path, "/graph"), http.StatusFound) http.Redirect(w, r, path.Join(o.ExternalURL.Path, "/graph"), http.StatusFound)
}) })
router.Get("/alerts", instrf("alerts", h.alerts)) router.Get("/alerts", instrf("alerts", h.alerts))