title: Google Cross-Origin Request
body: <p>I am trying to use Google JS API from my HTML page and I have to do something like:</p>
  
  <pre><code>&lt;script src="https://www.google.com/jsapi?key=MY_API_KEY"/&gt;
  </code></pre>
  
  <p>But I am getting the following error:</p>
  
  <p>Firefox: </p>
  
  <blockquote>
    <p>Cross-Origin Request Blocked: The Same Origin Policy disallows reading
    the remote resource at <a href="https://www.google.com/jsapi?key=MY_API_KEY" rel="nofollow noreferrer">https://www.google.com/jsapi?key=MY_API_KEY</a>.
    (Reason: CORS header 'Access-Control-Allow-Origin' missing).</p>
  </blockquote>
  
  <p>Chrome:</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load
    <a href="https://www.google.com/jsapi?key=MY_API_KEY" rel="nofollow noreferrer">https://www.google.com/jsapi?key=MY_API_KEY</a>. Response to preflight
    request doesn't pass access control check: No
    'Access-Control-Allow-Origin' header is present on the requested
    resource. Origin '<a href="http://localhost:8080" rel="nofollow noreferrer">http://localhost:8080</a>' is therefore not allowed
    access. The response had HTTP status code 405.</p>
  </blockquote>
  
  <p>As I have read it is caused by browsers restrictions to crossed request but I have no clue about how to fix it so I can do that request. Can anyone give me a tip? </p>