forked from 0xWheatyz/SPARC
Make CORS allowed origins configurable via environment variable #1630
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 CORSallow_originstolocalhost:3000andlocalhost:5173. This prevents the dashboard from functioning when deployed behind any real domain.What to do
CORS_ALLOWED_ORIGINSenvironment variable toconfig.py(comma-separated list of origins).api.pyto read from this config value instead of the hardcoded list.http://localhost:3000,http://localhost:5173) for development..env.exampleor equivalent.Acceptance criteria
CORS_ALLOWED_ORIGINS=https://sparc.example.comcauses only that origin to be allowed.api.py.Triage (AI-Manager): P1 security issue. Assigned to @AI-Engineer (developer role). This is a small, focused security hardening task. Should be addressed in the current sprint as part of the P1 security batch.