mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-14 19:20:37 +03:00
Add a catchall route to redirect everything to app/index.html
This commit is contained in:
parent
75cd21da1f
commit
3b6d0b3d15
@ -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…
x
Reference in New Issue
Block a user