From 89488a3cf4a326b56015885973467cae17982b7e Mon Sep 17 00:00:00 2001 From: mpl Date: Thu, 7 May 2015 17:39:29 +0200 Subject: [PATCH] pkg/server: redirect "/" to "/ui/" Fixes #593 Change-Id: I6d98c3560aa329e9fd8a30012a8f283903d7d274 --- pkg/server/root.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/server/root.go b/pkg/server/root.go index 0fb4dbcfb..3dfe5cd05 100644 --- a/pkg/server/root.go +++ b/pkg/server/root.go @@ -145,6 +145,10 @@ func (rh *RootHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) { if rh.Stealth { return } + if req.RequestURI == "/" && rh.ui != nil { + http.Redirect(rw, req, "/ui/", http.StatusMovedPermanently) + return + } if req.URL.Path == "/favicon.ico" { ServeStaticFile(rw, req, Files, "favicon.ico") return