-
-
Notifications
You must be signed in to change notification settings - Fork 120
Feature Request - Web Server CORS? #229
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
Comments
Hello @svbackend, As a workaround, maybe you can only register and enable the bundle in dev so that you don't need the additional logic ? Features request-wise, lately I have seen quite a lot of this use, so maybe the Symfony CLI should answer this use case. Another alternative would be to allow somehow proxying the JS dev server so that both contents are served from the same origin. I didn't put any though into this kind of UX or implementation so I have no clue how to do this. |
I stumbled on the need for CORS today as well. This is another proof that CORS configuration could be useful. @fabpot what do you thin
8000
k about adding a -enable-cors or -allow-cors flag? |
That would work for me. |
Hi, I've opened a PR at #293 |
What about the idea of allowing the addition of custom headers in |
feat(http): add flag/config to allow CORS requests, close #229
Hello, currently I'm using
symfony serve
command for local development which starts web server for symfony app binded to 127.0.0.1:8000 (and other random port) but whenever I'm making request from react app which is on 127.0.0.1:3000 I'm getting CORS error.I know that there are bundles to fix this issue but the reason I don't want to install them is that I don't really need CORS on production and don't really want to add additional logic like
if APP_ENV == dev { add cors headers }
it's just for local development, so I thought maybe the ideal place to handle this issue is actually symfony web server itself since it's used specifically for local development?Additional option like
symfony serve --disable-cors
would be perfect solution, or you guys think it's not the right place to handle it?The text was updated successfully, but these errors were encountered: