I get a cross origin error when I do an AJAX call, and am wondering if there´s a way to solve that. Thanks!
closed as unclear what you're asking by Kelly J Andrews, dphil, Eric, Chris Duncombe, Keith C Dec 17 '14 at 17:45
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
The use of CORS (Cross-Origin Resource Sharing) is a good way to deal with the limitations around cross-origin requests.
With Winter '15 Salesforce added CORS support to the Chatter REST API. You can read more about it here: Winter '15 Release Notes: CORS
James Ward has also created a proxy that adds the CORS headers to Salesforce's REST APIs here: Salesforce CORS Proxy and he has written a blog post about it here: Cross-Origin Resource Sharing (CORS) for Salesforce.com
You cannot use REST API directly. You need to have some proxy page which will set headers. Normally we use "ForceTK" library to route all request to proxy page.
Here are some articles by pat -
Example of using ForceTk using Nodejs