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 0d9486b660
commit c85df2dac7
No known key found for this signature in database
GPG key ID: FBA61B9FB7CCE1A7

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
})