returns a 404 if not found instead of redirect to ui

This commit is contained in:
Drew Bailey
2019-11-08 15:34:35 -05:00
parent 5e117eccfe
commit 39280e7a94

View File

@@ -277,6 +277,11 @@ func handleUI(h http.Handler) http.Handler {
func handleRootRedirect() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
if req.URL.Path != "/" {
w.WriteHeader(http.StatusNotFound)
return
}
http.Redirect(w, req, "/ui/", 307)
return
})