1
When I try to give a GET on a link here on my server that is not in host location happens this message:
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.
Code of the 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);
});