title: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin is therefore not allowed access
body: <p>I am checking whether a particular url is currently up or not, by adding a http get functionality to a button in my ui5 application.</p>
  
  <p>For this, the code is as below:</p>
  
  <pre><code>        _onButtonPress: function () {
  
           var xhr = new XMLHttpRequest();
  
          xhr.open('GET', this.getView().byId("sap_Responsive_Page_0-content-sap_ui_layout_form_SimpleForm-1476966827717-content-sap_m_Input-1476966871600").getValue(), true);
          xhr.send();
          xhr.onreadystatechange = processRequest;
          function processRequest(e) {
  if (xhr.readyState == 4 &amp;&amp; xhr.status == 200) {
      var response = (xhr.responseText);
      alert(response);    }
  }},
  </code></pre>
  
  <p>For the url input, we are using https requests only.</p>
  
  <p>But when I put a value for the url and test the button,
  I get,</p>
  
  <p>XMLHttpRequest cannot load <a href="https://my3" rel="nofollow noreferrer">https://my3</a>****6.sapbydesign.com/sap/byd/runtime/(entered url). No '<strong>Access-Control-Allow-Origin</strong>' header is present on the requested resource. Origin '<a href="https://application" rel="nofollow noreferrer">https://application</a> browser url' is therefore not allowed access.</p>
  
  <p>The idea is to check the status of url and set the status state from the url status.
     <a href="https://i.stack.imgur.com/xGFiv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xGFiv.png" alt="enter image description here"></a></p>
  
  <p>How can I prevent this from happening??
  Br
  Suraj N</p>