title: Google Maps API: No 'Access-Control-Allow-Origin' header is present on the requested resource
body: <p>I've seen this question asked by multiple people, none of the answers have worked for me.</p>
  
  <p>I'm trying to make an API call to the google maps api with react/axios. </p>
  
  <p>This is my get request:</p>
  
  <pre><code>componentDidMount() {
    axios({
     method : 'get',
     url : `http://maps.googleapis.com/maps/api/js?key=${key}/`,
     headers: {
       "Access-Control-Allow-Origin": '*'
       "Access-Control-Allow-Methods": 'GET',
     },
    })
   .then(function (response) {
    console.log(response);
   })
   .catch(function (error) {
    console.log(error);
   });
  }
  </code></pre>
  
  <p>This is the error msg:</p>
  
  <pre><code>XMLHttpRequest cannot load http://maps.googleapis.com/maps/api/js?
  key=xxxxxxxxx/. Response to preflight request doesn't pass access control 
  check: No 'Access-Control-Allow-Origin' header is present on the 
  requested resource. Origin 'http://localhost:3000' is therefore not allowed access.
  </code></pre>
  
  <p>I've read the article con CORS that everyone else points to
  <a href="https://www.html5rocks.com/en/tutorials/cors/" rel="noreferrer">https://www.html5rocks.com/en/tutorials/cors/</a></p>
  
  <p>but I can't find an answer to my problem there.</p>