sanic-org / sanic-ext

Extended Sanic functionality
https://sanic.dev/en/plugins/sanic-ext/getting-started.html
MIT License
50 stars 36 forks source link

chore: strip CORS_ORIGINS before assigning value #233

Closed skippednote closed 11 months ago

skippednote commented 1 year ago

In case the CORS_ORIGINS value is a comma separated string but with spaces in between them like https://google.com, http://localhost:3000. In this case only the first URL is whitelisted. Stripping the spaces fixes the issue.

My team spent half of the day debugging this :)