For demo purposes the CORS proxy is available at:
So you can just replace your Salesforce domain name with
sfdc-cors.herokuapp.com to use the CORS proxy. Here is an example:
$ curl -i -H 'Authorization: Bearer YOUR_SESSION_ID' https://sfdc-cors.herokuapp.com/services/data/v30.0/query/?q=select%20Id%20from%20Account
HTTP/1.1 200 OK
The HTTP Response contained the necessary CORS header on the
GET request. An
OPTIONS request also returns the right response headers to allow the request.
This app is open source so you can easily deploy it on your own Heroku app or in your own environment for production usage.
One of the other nice features of this proxy is that it figures out which Salesforce instance to connect to. So you no longer need to specify something like
na9.salesforce.com - instead just use one domain name for all of your apps and instances.
I hope this is useful for you. Let me know if you have any questions or feedback.