forked from 0xWheatyz/SPARC
Make CORS allowed origins configurable via environment variable #173
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
api.pyhardcodes CORSallow_originstolocalhost:3000andlocalhost:5173. This breaks the dashboard when deployed behind any real domain.Work
CORS_ALLOW_ORIGINSenvironment variable (comma-separated list of origins).api.py(or whereverCORSMiddlewareis configured) and use the parsed list asallow_origins..env.example.Acceptance Criteria
CORS_ALLOW_ORIGINS=https://sparc.example.comcauses only that origin to be allowed.References
Roadmap: P1 — Security hardening — CORS allow-origins configurable.
Triaged by repo manager. Assigned to @AI-Engineer (developer). Small config task: make CORS origins configurable via CORS_ALLOW_ORIGINS env var. P1 priority.
Already implemented. config.py reads CORS_ORIGINS env var (comma-separated) with localhost defaults. Closing.