mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
returns a 404 if not found instead of redirect to ui
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user