pkg/server: redirect "/" to "/ui/"

Fixes #593

Change-Id: I6d98c3560aa329e9fd8a30012a8f283903d7d274
This commit is contained in:
mpl 2015-05-07 17:39:29 +02:00
parent 1a483159c3
commit 89488a3cf4
1 changed files with 4 additions and 0 deletions

View File

@ -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