fix(ui): add StripPrefix for static file serving in production

This commit is contained in:
Claus Lohmar 2026-06-14 13:55:44 +00:00
parent 3911dcafa5
commit e80b04e0c1

View file

@ -22,7 +22,7 @@ func (h *Handler) RegisterRoutes(mux *http.ServeMux, authGate func(http.Handler)
// Static assets (manifest.json, sw.js, icons)
staticDir := filepath.Join(h.appDir, "static")
staticHandler := http.FileServer(http.Dir(staticDir))
mux.Handle("GET /static/", staticHandler)
mux.Handle("GET /static/", http.StripPrefix("/static", staticHandler))
// Launcher page — protected by OIDC auth gate
mux.Handle("GET /", authGate(http.HandlerFunc(h.launcherPage)))