improvement: CORS origin hardcoded to localhost #10
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The CORS configuration hardcodes the origin to
localhost:5173, making it inflexible for different environments (staging, production). This requires code changes for each deployment and may cause issues when the frontend is deployed to different domains.Location
src/app.tscors()middlewareHow to Fix
Use an environment variable to configure allowed origins:
Update
.env:Acceptance Criteria