forked from 0xWheatyz/SPARC
Security: make CORS allowed origins configurable via environment variable #517
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 allowed origins tolocalhost:3000andlocalhost:5173. This breaks the dashboard when deployed behind a real domain.Task
CORS_ALLOWED_ORIGINSenvironment variable (comma-separated list)config.pyto includeCORS_ALLOWED_ORIGINSwith appropriate defaultsdocker-compose.ymland any relevant READMEAcceptance Criteria
CORS_ALLOWED_ORIGINSenv var is read and parsed (comma-separated)Verified complete:
config.pyreadsCORS_ORIGINSenv var (comma-separated), falls back to localhost origins.api.pyusesconfig.cors_originsin CORS middleware. Documented indocker-compose.ymland.env.example. Closing as implemented.