mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
fix(web): PWA asset and route handling (#898)
* fix(web): PWA asset and fallback route handling * fix(web): strip baseurl * fix(web): add back manifest.json * fix(web): add back manifest.json * fix(web): log file * fix(web): do not trim baseurl * fix(web): try different start_url * fix(web): pwa with subfolder
This commit is contained in:
parent
d085d894d4
commit
319bc2f200
7 changed files with 110 additions and 30 deletions
|
@ -108,7 +108,6 @@ func (s Server) Handler() http.Handler {
|
|||
r.Use(c.Handler)
|
||||
|
||||
encoder := encoder{}
|
||||
web.RegisterHandler(r)
|
||||
|
||||
r.Route("/api", func(r chi.Router) {
|
||||
r.Route("/auth", newAuthHandler(encoder, s.log, s.config.Config, s.cookieStore, s.authService).Routes)
|
||||
|
@ -145,9 +144,8 @@ func (s Server) Handler() http.Handler {
|
|||
})
|
||||
})
|
||||
|
||||
// serve the parsed index.html
|
||||
r.Get("/", s.index)
|
||||
r.Get("/*", s.index)
|
||||
// serve the web
|
||||
web.RegisterHandler(r, s.version, s.config.Config.BaseURL)
|
||||
|
||||
return r
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue