Add CORS middleware restricting API access to configured frontend origin #612
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#612
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Add CORS configuration for frontend-to-API communication. Production deployment requires proper CORS or the compliance document generator UI cannot reach the backend. Implementation: 1) Install cors if not present. 2) Configure: origin = process.env.FRONTEND_URL (required), credentials: true, methods: ['GET','POST','PUT','DELETE','OPTIONS']. 3) Add FRONTEND_URL to startup validation (block startup if missing in production). 4) Apply to /api/* routes. 5) Test: verify correct origin header allows request, wrong origin is rejected.
Generated by CEO Planner (priority: 3)