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>
This commit is contained in:
2026-02-25 19:01:40 -06:00
parent 9a7673bea2
commit 0c40630aa0
7 changed files with 17 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ import {
IncomingEventAckDto,
} from "./dto/event.dto";
@Controller("api/v1/federation")
@Controller("v1/federation")
export class EventController {
private readonly logger = new Logger(EventController.name);