How to use CORS to implement JavaScript Google Places API request : <p>I really do NOT understand how I'm supposed to make this work:</p>

<pre><code>var requestURL = 'https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&amp;key=AIzaSyAW4CQp3KxwYkrHFZERfcGSl--rFce4tNw';

console.log(requestURL);

$.getJSON( requestURL, function( data ) {
  // data
  console.log(data);
});
</code></pre>

<p>and my HTML file:</p>

<pre><code>  &lt;body&gt;

        &lt;script
  src="https://code.jquery.com/jquery-2.2.4.min.js"
  integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
  crossorigin="anonymous"&gt;&lt;/script&gt;
        &lt;script src="main.js" charset="utf-8"&gt;&lt;/script&gt;   
  &lt;/body&gt;
</code></pre>

<p>I always get the <strong>No 'Access-Control-Allow-Origin' header is present on the requested resource.</strong> message... even though if I go to <a href="https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&amp;key=AIzaSyAW4CQp3KxwYkrHFZERfcGSl--rFce4tNw" rel="noreferrer">https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&amp;key=AIzaSyAW4CQp3KxwYkrHFZERfcGSl--rFce4tNw</a> in my browser I get the proper JSON returned. </p>

<p>I am lead to believe that CORS can help me here. I don't understand CORS. Please, can anyone help me in plain simple terms? What should I change to make this work?? </p>

<p>Thanks </p>
