Hi there, i'm trying to autocomplete a filed requesting JSON data from another server but browser always blocking for non matching CORS policy.
My options var is this:
var options = {
url: function(phrase) {
return "CROSS DOMAIN" + phrase;
},
ajaxSettings: {
method: "GET",
crossDomain: true,
preparePostData : function(xhr) {
xhr.setRequestHeader('Apikey','APIKEY');
return xhr;
},
dataType: "json",
data: {
dataType: "json",
Apikey : "APIKEY",
Hi there, i'm trying to autocomplete a filed requesting JSON data from another server but browser always blocking for non matching CORS policy. My options var is this: var options = { url: function(phrase) { return "CROSS DOMAIN" + phrase; }, ajaxSettings: { method: "GET", crossDomain: true, preparePostData : function(xhr) { xhr.setRequestHeader('Apikey','APIKEY'); return xhr; }, dataType: "json", data: { dataType: "json", Apikey : "APIKEY",
}, ...
how can i solve?