fix: Add production domains to CORS whitelist
Some checks failed
CI/CD Pipeline / Build Application (push) Has been cancelled
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled

Added production domains to CORS configuration:
- https://maternal.noru1.ro (production frontend)
- https://maternal-api.noru1.ro (production API/GraphQL playground)

This ensures the frontend can communicate with the backend API in production.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-03 07:18:11 +00:00
parent 2bb7a2d512
commit 9071a12279

View File

@@ -42,9 +42,11 @@ async function bootstrap() {
// Strict CORS configuration
const allowedOrigins = process.env.CORS_ORIGIN?.split(',').map((o) => o.trim()) || [
'http://localhost:19000', // Expo dev
'http://localhost:3001', // Next.js dev (legacy)
'http://localhost:3030', // Next.js dev (current)
'http://localhost:19000', // Expo dev
'http://localhost:3001', // Next.js dev (legacy)
'http://localhost:3030', // Next.js dev (current)
'https://maternal.noru1.ro', // Production frontend
'https://maternal-api.noru1.ro', // Production API (for GraphQL playground)
];
app.enableCors({