It turns out that it is impossible to send requests without these parameters.

var xmlRequest = new XMLHttpRequest(); xmlRequest.open('POST', $('#SupUrl').val() + "ADMIN_BH_APP/SupWsExtService", false); xmlRequest.onreadystatechange = function(){ alert(xmlRequest.responseXML) } 

although the response from the server comes and the normal one comes,

 SUP.js:32 XMLHttpRequest cannot load http://10.44.175.4:3680/ADMIN_BH_APP/SupWsExtService. No 'Access-Control-Allow- Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.supChecker @ SUP.js:32paramChecker @ SUP.js:6onclick @ index.html:157 SUP.js:32 Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://10.44.175.4:3680/ADMIN_BH_APP/SupWsExtService'.supChecker @ SUP.js:32paramChecker @ SUP.js:6onclick @ index.html:157 

What to do

  • And the domain on which the request leaves - belongs to you? - Vitaly Emelyantsev

1 answer 1

If the third-party site belongs to you, then the response should include CORS - headers. https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

Otherwise, send requests from the server side of your site / application.