mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 21:17:37 +03:00
Small refactorings
This commit is contained in:
parent
08840f6170
commit
7540881695
8 changed files with 13 additions and 19 deletions
|
@ -65,7 +65,7 @@ func (s *Server) initRoutes() {
|
|||
r.Use(clientUniqueIdAdder)
|
||||
r.Use(loggerInjector)
|
||||
r.Use(requestLogger)
|
||||
r.Use(robotsTXT(ui.Assets()))
|
||||
r.Use(robotsTXT(ui.BuildAssets()))
|
||||
r.Use(authHeaderMapper)
|
||||
r.Use(jwtVerifier)
|
||||
|
||||
|
@ -99,7 +99,7 @@ func (s *Server) initRoutes() {
|
|||
func (s *Server) frontendAssetsHandler() http.Handler {
|
||||
r := chi.NewRouter()
|
||||
|
||||
r.Handle("/", serveIndex(s.ds, ui.Assets()))
|
||||
r.Handle("/*", http.StripPrefix(s.appRoot, http.FileServer(http.FS(ui.Assets()))))
|
||||
r.Handle("/", serveIndex(s.ds, ui.BuildAssets()))
|
||||
r.Handle("/*", http.StripPrefix(s.appRoot, http.FileServer(http.FS(ui.BuildAssets()))))
|
||||
return r
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue