CORS headers for JSON data requests


I'm building an app in html5/js and I'd like to request data from the mydex server using XMLHttpRequest, but the resource won't load due to CORS policies.  My error is


XMLHttpRequest cannot load . No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.


I believe the servers need to respond with the correct headers to allow this kind of request.  I can't find any help in the mydex docs.  Is this something that can be added, or is there a mydex workaround?

Mon, 20/04/2015 - 16:58



Technical Answer

Hi Ruz,

You can see an example of the kind of thing that you are trying to do here:

In jQuery you can do something like the following to get around the cross domain issue:

  url: url,
  dataType: "jsonp",
  crossDomain: true
}).done(function (response) {

Hope that helps!

MydexCIC's picture
Wed, 22/04/2015 - 14:22