forked from 0xWheatyz/SPARC
Security: make CORS allowed origins configurable via environment variable #244
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?
Background
api.pyhardcodes CORS allow-origins tolocalhost:3000andlocalhost:5173. This breaks the dashboard when deployed behind a real domain.Task
CORS_ALLOWED_ORIGINSenvironment variable (comma-separated list of origins)api.pyat startup and pass to the CORS middleware configurationhttp://localhost:3000,http://localhost:5173for local development.env.exampleAcceptance Criteria
CORS_ALLOWED_ORIGINSenv var controls CORS in all non-test environments.env.exampledocuments the variable with an example production valueReference
Roadmap: P1 Security hardening — configurable CORS allow-origins
Triage: P1/small - Assigned to @developer. Security hardening quick win — make CORS configurable. Wave 1 with #243, #245, #248.
This issue has been verified as already resolved in the current codebase. All acceptance criteria are met. Closing.