-
-
Notifications
You must be signed in to change notification settings - Fork 893
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] CORS #2564
Comments
If you are using symfony flex, you should update |
Thanks for your reply. How do I know whether something generated with API Platform is using symfony flex? I can see that file, but I can see that some people have trouble setting it to a wildcard, e.g. nelmio/NelmioCorsBundle#99 . Would you expect it to work if I just change it to:
I don't get any Access-Control-Allow-Origin headers back when I try that. |
If it doesnt fixed until now then just replace env var with wildcard :)
2019-02-27, tr 15:51, Edward Hibbert <[email protected]> rašė:
… Thanks for your reply. How do I know whether something generated with API
Platform is using symfony flex?
I can see that file, but I can see that some people have trouble setting
it to a wildcard, e.g. nelmio/NelmioCorsBundle#99
<nelmio/NelmioCorsBundle#99> . Would you expect
it to work if I just change it to:
`CORS_ALLOW_ORIGIN=*
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2564 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACmMODzoxovgvguP8wmJoiaBjyGRVfDbks5vRo13gaJpZM4bUi1E>
.
|
That's what I've tried (I might have edited after you replied). |
You mean you tried:
? |
Ah, I see what you mean (jn api/config/nelmio_cors.yaml). Bingo, that works. Thank you. |
New to API Platform and Symfony, so be gentle. I have an app based on the instructions here; I can use it in local dev but get CORS issues from the Admin when accessing the API after deploying to platform.sh.
I have seen #1199, but that mentions files (e.g. parameters.yml) that don't exist in the sample, and seem to relate to other Symfony setups. I've tried making various changes, but feel like I'm just changing random code without knowing what I'm doing.
So I would be grateful if someone could give me some pointers to enable wildcard CORS on the API of a project generated using API Platform.
The text was updated successfully, but these errors were encountered: