Quando eu tento dar um GET em um link aqui no meu servidor que nao esta em local host acontece esta mensagem:
XMLHttpRequest cannot load http://192.168.25.66:8089/datasnap/rest/TServerConnMonitorMethods/Get_DataHora. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 500.
Codigo da Request:
var settings = {
"async": true,
"crossDomain": true,
"url": "http://192.168.25.66:8089/datasnap/rest/TServerConnMonitorMethods/Get_DataHora",
"method": "GET",
"headers": {
"cache-control": "no-cache",
"postman-token": "266b68dc-31a5-bf40-69f4-2fa3be60cd9c"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});