diff --git a/backend/src/main.ts b/backend/src/main.ts index 59c2daf..0c460bf 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -9,7 +9,11 @@ async function bootstrap() { const app = await NestFactory.create(AppModule); // Global prefix for all routes - app.setGlobalPrefix('api/v1'); + // In production (App Platform), the ingress routes /api to this service + // So we only need /v1 prefix here + // In development, we need the full /api/v1 prefix + const isProduction = process.env.NODE_ENV === 'production'; + app.setGlobalPrefix(isProduction ? 'v1' : 'api/v1'); // Enable CORS app.enableCors({