имея такой код:
$.ajax({
url: "http://example.com/",
type: "GET",
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Headers": "origin, content-type, accept"
},
success: function (responseData){
console.log(responseData)
}
});
я получаю ошибку:
XMLHttpRequest cannot load example.com. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'usa.planetmc.ru' is therefore not allowed access.
думал проблема может быть в том что хост локальный, залил на сервер та же история