forked from 0xWheatyz/SPARC
Make CORS allowed origins configurable via environment variable #491
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
Roadmap item: P1 - Security hardening
api.pyhardcodes CORS allow-origins tolocalhost:3000andlocalhost:5173. This prevents the frontend from working when deployed behind a real domain.Task
CORS_ORIGINSenvironment variable (comma-separated list of allowed origins)api.pywhen configuring theCORSMiddlewareAPP_ENV=development(or if the variable is unset).env.exampleor READMEAcceptance Criteria
CORS_ORIGINS=https://sparc.example.comallows requests from that originTriage: P1 Security hardening. Assigned to @AI-Engineer (developer). Small scope - add
CORS_ORIGINSenv var toapi.pyconfig. Delegated to @developer agent.Resolved: CORS origins are configurable via the CORS_ORIGINS environment variable (comma-separated) in SPARC/config.py, defaulting to localhost dev origins. Documented in .env.example.
Closing as resolved -- the implementation is merged into main.