Żądanie CORS jQuery AJAX
Mam problemy z żądaniem ajax. Dostałem błąd
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Więc to, co próbowałem było to żądanie jQuery ajax:
var request = $.ajax({
type: 'GET',
url: url,
dataType: "json",
xhrFields: {
withCredentials: true
}
});
request.done(function(data){
console.log(data);
});
Ale nadal nie działa. Nadal dostaję błąd.
Jak mam to naprawić?