I am working on an internal web application at work. In IE10, requests work fine, but in Chrome, all AJAX requests (of which there are many) are sent using OPTIONS instead of what I gave to this method. Technically, my requests are cross domain. The site is hosted on localhost: 6120, and the service with which I am making AJAX requests is located at 57124. This closed jquery error identifies the problem, but is not a real fix.
What can I do to use the correct http method in ajax requests?
Edit:
This is in loading the document on each page:
jQuery.support.cors = true;
And each AJAX is built similarly:
var url = 'http://localhost:57124/My/Rest/Call'; $.ajax({ url: url, dataType: "json", data: json, async: true, cache: false, timeout: 30000, headers: { "x-li-format": "json", "X-UserName": userName }, success: function (data) {
jquery ajax cross-domain
Corey Ogburn Feb 14 '14 at 15:20 2014-02-14 15:20
source share