fix(api): add global /api prefix to resolve frontend route mismatch #507

Merged
jason.woltje merged 2 commits from fix/api-global-prefix into main 2026-02-26 01:13:49 +00:00

2 Commits

Author SHA1 Message Date
bf213de374 fix(deps): override rollup to >=4.59.0 for CVE-2025-XXXXX
All checks were successful
ci/woodpecker/push/orchestrator Pipeline was successful
ci/woodpecker/push/api Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
Rollup 4.57.0 has arbitrary file write via path traversal
(GHSA-mw96-cpmx-2vgc). Added pnpm override to force >=4.59.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:08:36 -06:00
0c40630aa0 fix(api): add global /api prefix to resolve frontend route mismatch
Some checks failed
ci/woodpecker/push/api Pipeline failed
Frontend API client prefixes all paths with /api/ (e.g. /api/projects,
/api/knowledge/entries) but backend controllers had no global prefix,
causing 404s on all data-fetching pages in production.

- Add setGlobalPrefix('api') in main.ts with exclusions for /health
  (Docker healthcheck) and /auth/* (BetterAuth OAuth flow)
- Strip redundant 'api/' from federation and CSRF controller paths
  that already included the prefix manually

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:01:40 -06:00