fix: serve SvelteKit _app assets correctly

- Use all: prefix in go:embed to include _app/ directory (Go skips
  _-prefixed dirs by default)
- Move jsonContentType middleware to /api route group only
- Use http.ServeContent for proper MIME type detection
- Remove unused fileServer variable
This commit is contained in:
2026-03-28 13:34:02 +03:00
parent 652229c67f
commit 4d4e07eb2e
3 changed files with 21 additions and 14 deletions
+3 -1
View File
@@ -88,9 +88,11 @@ func (s *Server) Router() chi.Router {
r.Use(recovery)
r.Use(logging)
r.Use(cors)
r.Use(jsonContentType)
r.Route("/api", func(r chi.Router) {
// JSON content type only for API routes (not static files).
r.Use(jsonContentType)
// Public auth endpoints (no auth required).
r.Post("/auth/login", s.login)
r.Get("/auth/oidc/login", s.oidcLogin)