Skip to content

fix: restrict CORS to an explicit origin allowlist - #11580

Open
samuelpatak-png wants to merge 2 commits into
SecureBananaLabs:mainfrom
samuelpatak-png:fix/11569-cors-allowlist
Open

fix: restrict CORS to an explicit origin allowlist#11580
samuelpatak-png wants to merge 2 commits into
SecureBananaLabs:mainfrom
samuelpatak-png:fix/11569-cors-allowlist

Conversation

@samuelpatak-png

Copy link
Copy Markdown

Summary

Replaces open cors() with an env-driven allowlist (safe localhost defaults outside production).

Test plan

  • Added focused regression tests
  • Ran npm test in apps/api three times with zero failures

Closes #11569

Made with Cursor

Closes SecureBananaLabs#11569

Co-authored-by: Cursor <cursoragent@cursor.com>
github-actions Bot added a commit that referenced this pull request Aug 3, 2026
Fail closed with callback(null, false) so denied origins do not surface as unhandled API errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: CORS configured without origin allowlist in app.js

2 participants