Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: multiple allow_origin entries #2285

Closed
ThePeterMick opened this issue May 14, 2024 · 1 comment
Closed

[Question]: multiple allow_origin entries #2285

ThePeterMick opened this issue May 14, 2024 · 1 comment
Labels

Comments

@ThePeterMick
Copy link

ThePeterMick commented May 14, 2024

Version

2.4

Question

I'm trying to pass in multiple allow_origin hostnames via .env file

.env:
CORS_ALLOW_ORIGIN='["http://localhost:3001","http://localhost:3002"]'

nelmio_cors.yaml
allow_origin: ['%env(json:CORS_ALLOW_ORIGIN)%']

but it keeps failing

when I do this in nelmio_cors.yaml, it works fine:
allow_origin: ['http://localhost:3001','http://localhost:3002']

Did anyone come across this? TIA 🙏

Additional context

Even GPT-4o thinks this should work, but sadly it doesn't (explored different options with ChatGPT too 🫠)

@ThePeterMick
Copy link
Author

Ooops sorry posted in the wrong repo

for those interested: nelmio/NelmioCorsBundle#199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant