From 01e14d1c68a0065a22adb9398bd74ad8a8181fd7 Mon Sep 17 00:00:00 2001 From: Sebastian Himberger Date: Fri, 26 Aug 2016 09:21:42 +0200 Subject: [PATCH] Added redirect from root to UI --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 48fbafa..8b9d994 100644 --- a/main.go +++ b/main.go @@ -14,6 +14,8 @@ func main() { if flag.NArg() > 0 { contentDir = flag.Arg(0) } + + http.Handle("/", http.RedirectHandler("/ui/",302)) http.Handle("/ui/assets/", http.StripPrefix("/ui/", http.FileServer(http.Dir(uiDirectory)))) http.Handle("/ui/", NewDebugHandlerWrapper(http.StripPrefix("/ui/", NewSingleFileServer(indexHtml)))) http.Handle("/list/", NewDebugHandlerWrapper(http.StripPrefix("/list/", NewListHandler(contentDir))))