I am getting CORS error while calling Third party REST URL from CRM 2016 javascript in IE 11. If I enable "Access data source across domains" in IE 11 security. It is working fine. As per client polity they are not going to enable "Access data source across domains". How to overcome this issue...
$.ajax({
url: "https://alphaTest:443/sql/management.cls", // example url
type: "POST",
async: false,
crossDomain: true,
contentType: 'text/xml',
headers: {
SOAPAction: "gama.com/Management.Search";// example url
},
beforeSend: function (xhr) {
xhr.setRequestHeader('Access-Control-Allow-origin', '*');
},
data: requestData,
success: function (SOAPResponse, hrs) {
return SOAPResponse;
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
Thanks in Advance...
*This post is locked for comments