You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered: