I have set up a public Salesforce REST api as explained in this post. (i.e. I have set up a site that directs a user to the webservice and have given the public site user access to only those records that are absolutely required as well as the Apex class that defines the web service). I am using a developer org and my intent was just to set up a REST web service that I could use while playing around with the
If I post the endpoint etc into my browser address bar then I get a nice bit of json back from the api:
However, when Backbone.js issues an ajax call, then I get the following error:
'Access-Control-Allow-Origin' header is present on the requested resource.
which, according to this post is because I am using
https but the browser has detected that the target domain is different from the current domain, which is apparently called a cross-domain reference.
Fair enough, but:
- I can't see an option to use a non-secure http endpoint. Maybe it is because I am using a developer edition org, but in the sites configuration that I have, there doesn't seem to be an option to add another custom url if that would help. Is there a way to configure a non-secure http endpoint?
Thanks a lot