-
Notifications
You must be signed in to change notification settings - Fork 13
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
Cors #4
Comments
I don't get it? Please elaborate the use case. |
Sure! When you use API for a single-page application, like created on react or something, you usually locate them on different domains. Moreover, during development they can be both on localhost but on different ports. And by default, cors wouldn't allow to make requests from frontend to backend, if backend doesn't provide client with special headers. It's only a browser's thing, mobile apps don't rely on cors. So, my workaround was to add them like that
But I created a BaseController class and extend it everytime instaed of ActiveController, because my application is built this way. |
Oh right. I'm using this template for mobile device and web services. I still can't get the best approach for this feature. Will all controller use this? If we add Do you have a better idea? |
I use BaseController with behaviours, but you can just mention this part in README, so user will handle it somehow. |
It would be great to have them out of the box, because without headers it doesn't work at all.
The text was updated successfully, but these errors were encountered: