Add a catchall route to redirect everything to app/index.html
This commit is contained in:
parent
75cd21da1f
commit
3b6d0b3d15
1 changed files with 1 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ func (a *Server) initRoutes() {
|
||||||
r.Use(InjectLogger)
|
r.Use(InjectLogger)
|
||||||
|
|
||||||
indexHtml := path.Join(conf.Server.BaseURL, consts.URLPathUI, "index.html")
|
indexHtml := path.Join(conf.Server.BaseURL, consts.URLPathUI, "index.html")
|
||||||
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
|
r.Get("/*", func(w http.ResponseWriter, r *http.Request) {
|
||||||
http.Redirect(w, r, indexHtml, 302)
|
http.Redirect(w, r, indexHtml, 302)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue