Add a catchall route to redirect everything to app/index.html
This commit is contained in:
+1
-1
@@ -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)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user