Skip to content

fix: change CORS whitelist domain matching logic#59

Open
budakhasan wants to merge 1 commit intohepsiburada:masterfrom
budakhasan:fix/cors-middleware
Open

fix: change CORS whitelist domain matching logic#59
budakhasan wants to merge 1 commit intohepsiburada:masterfrom
budakhasan:fix/cors-middleware

Conversation

@budakhasan
Copy link
Copy Markdown

Previously, Array.map was used instead of Array.some, causing the whitelist check to always return a truthy array rather than validating the origin. Replace with some and strict matching that allows exact domain matches, subdomains, and protocol-prefixed origins.

Previously, `Array.map` was used instead of `Array.some`, causing the
whitelist check to always return a truthy array rather than validating
the origin. Replace with `some` and strict matching that allows exact
domain matches, subdomains, and protocol-prefixed origins.
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.

2 participants