Overview
main.ts configures CORS as:
origin: configService.get<string>('FRONTEND_URL') || 'http://localhost:3001',
credentials: true,
With credentials: true, the allowed origin must be exact and trustworthy. The fallback to a localhost origin means a misconfigured deployment where FRONTEND_URL is unset silently permits credentialed requests from a development origin instead of failing loudly.
Tasks
Acceptance Criteria
Dependencies
Pairs with [BE-113].
Notes for Contributors
Comment below to be assigned.
Overview
main.tsconfigures CORS as:With
credentials: true, the allowed origin must be exact and trustworthy. The fallback to a localhost origin means a misconfigured deployment whereFRONTEND_URLis unset silently permits credentialed requests from a development origin instead of failing loudly.Tasks
FRONTEND_URLexplicitly in production — fail startup rather than falling back to localhost ([BE-113] provides the validation mechanism).Originheader back whilecredentials: trueis set.Acceptance Criteria
Dependencies
Pairs with [BE-113].
Notes for Contributors
Comment below to be assigned.