Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Set custom URL on the REST adapter #249
Is this actually enough to enable cross domain requests? I tried this out but couldn't get it to work -- an OPTIONS request is issued to the backend, which then returns with 200 OK and proper access headers. Then nothing happens, so the data is not fetched... No error message either. Do you have a working example you could share? Thank you!
You have to setup CORS on your server, in my project I use Rails with the rack-cors gem to take care of CORS in a middleware. If you are not familiar with CORS, it is a way to tell the browser that your server accepts XHR requests coming from other domains. By default and for security reason the browser does not let you do XHR requests to other domains.
The following is what I have to configure rack-cors in
Security wise, its a pretty bad idea to use this because I am accepting any other domains, but I am still in development and I will tighten this up later.
I hope this helps.