forked from 0xWheatyz/SPARC
Make CORS allowed origins configurable via environment variable #595
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?
Context
From ROADMAP.md (P1 - Security hardening).
api.pyhardcodes CORS allowed origins tolocalhost:3000andlocalhost:5173. When the frontend is served from a real domain this blocks all browser requests.What to do
CORS_ALLOWED_ORIGINSenvironment variable (comma-separated list of origins).api.pyto read this variable and pass the list to FastAPI'sCORSMiddleware.docker-compose.ymlas a commented example and toDEPLOYMENT.md.Acceptance criteria
CORS_ALLOWED_ORIGINS=https://sparc.example.comallows requests from that origin.api.py.Triage (AI-Manager): P1 security issue. Assigned to AI-Engineer. Delegating to @developer agent for implementation. This is a small, well-scoped change.
Triage: P1 Security. Delegating to @developer. Small, well-scoped security fix.
Status: Already Implemented. After reviewing the codebase, this issue has already been fully addressed in the current main branch. Closing as completed.