jQuery should send an HTTP OPTION request to initiate pre-flight CORS, yet it always sends out a HTTP POST. Since it is a POST the browser doesn't get the Access-Control-Allow-Origin or Access-Control-Allow-Method and the browser has NO CHOICE but to 404 the response.
jQuery.ajax('https://domain.com/path', {
crossDomain: true,
data: postData,
error: function(jqXHR, status, errorThrown) {
//whatever
},
success: function(data, status, jqXHR) {
//whatever
},
type: "POST",
xhrFields: {
withCredentials: true
}
});