fix: add global /api prefix to match nginx proxy; exclude health endpoint
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 54s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
WangDL 2026-05-18 15:29:36 +08:00
parent 4b11010c65
commit 01df2453d7

View File

@ -12,6 +12,8 @@ async function bootstrap() {
app.use(helmet()); app.use(helmet());
app.setGlobalPrefix('api', { exclude: ['health'] });
app.enableCors({ app.enableCors({
origin: isProduction origin: isProduction
? [configService.get('app.allowedOrigin', 'https://longde.cloud')] ? [configService.get('app.allowedOrigin', 'https://longde.cloud')]