title: Access-Control-Allow-Origin header Missing
body: <p>I have included this javascript on other domains:</p>
  
  <pre><code>var id = "&lt;?php echo check_input($_GET['token']); ?&gt;";
      var querystring = "";
      var lockerurl = "https:\/\/www.example.com\/contentlocker\/getlocker.php?" + 'id=' + encodeURIComponent(id) + '&amp;r=' + encodeURIComponent(referrer) + querystring;
  
  
      var iframecontents;
      var old_display;
  
      function optionstoquery(options) {
  
          var query = "";
  
          if (options.mt) query += "&amp;mt=" + encodeURIComponent(options.mt);
          if (options.dt) query += "&amp;dt=" + encodeURIComponent(options.dt);
          if (options.dd) query += "&amp;dd=" + encodeURIComponent(options.dd);
          if (options.md) query += "&amp;md=" + encodeURIComponent(options.md);
  
          return query;
  
      }
  
      function og_load(options) {
  
          if (options) lockerurl += optionstoquery(options);
  
                          //preload
              var xhr = new XMLHttpRequest();
              xhr.open('GET', lockerurl, true);
              xhr.onreadystatechange = function() {
                  if (this.readyState!==4) return;
                  if (this.status!==200) {
                      iframecontents = false;
                      return;
                  }
  
                  iframecontents = this.responseText;
              };
              xhr.send();
  
              ogEditBody();
                  }
  </code></pre>
  
  <p>Console it show me:</p>
  
  <blockquote>
    <p>Cross-Origin Request Blocked: The Same Origin Policy disallows reading
    the remote resource at
    <a href="https://www.example.com/contentlocker/getlocker.php?id=3e066b64a78214a17620b5521b6d3ec4&amp;r=aHR0cDovL2NwYWh1Yi51cy9yb29zdGVyMi5odG1s" rel="nofollow noreferrer">https://www.example.com/contentlocker/getlocker.php?id=3e066b64a78214a17620b5521b6d3ec4&amp;r=aHR0cDovL2NwYWh1Yi51cy9yb29zdGVyMi5odG1s</a>.
    (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).</p>
  </blockquote>
  
  <p>getlocker.php contains some php and html code!</p>
  
  <p>I using Plesk as webserver and I have tried by adding in getlocker.php:</p>
  
  <pre><code>header('Access-Control-Allow-Origin: *');
  </code></pre>
  
  <p>But still not working!</p>