title: KML with image that from source that does not have Access_Control_Allow_Origin header
body: <p>i'm using openlayers and trying to show a KML inside my map on a web application hosted by IIS.  An example of the KML i'm using is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;kml xmlns="http://www.opengis.net/kml/2.2"&gt;
     &lt;Document&gt;
        &lt;name&gt;Test CORS KML&lt;/name&gt; 
        &lt;Style id="badCors"&gt;
           &lt;IconStyle&gt;
              &lt;color&gt;ff589d0f&lt;/color&gt;
              &lt;scale&gt;1&lt;/scale&gt;
              &lt;Icon&gt;&lt;href&gt;https://www.gstatic.com/mapspro/images/stock/1415-rec-winter-snow.png&lt;/href&gt;
              &lt;/Icon&gt;
           &lt;/IconStyle&gt;
        &lt;/Style&gt;
        &lt;Placemark&gt;
           &lt;name&gt;Bad Mark&lt;/name&gt;
           &lt;styleUrl&gt;#badCors&lt;/styleUrl&gt;
           &lt;Point&gt;
              &lt;coordinates&gt;4.3849582,50.9757646,0&lt;/coordinates&gt;
           &lt;/Point&gt;
        &lt;/Placemark&gt;
     &lt;/Document&gt;
  &lt;/kml&gt;
  </code></pre>
  
  <p>this doesn't work however, i get the error:</p>
  
  <blockquote>
    <p>Access to image at
    '<a href="https://www.gstatic.com/mapspro/images/stock/1415-rec-winter-snow.png" rel="nofollow noreferrer">https://www.gstatic.com/mapspro/images/stock/1415-rec-winter-snow.png</a>'
    from origin '<a href="http://localhost" rel="nofollow noreferrer">http://localhost</a>' has been blocked by CORS policy: No
    'Access-Control-Allow-Origin' header is present on the requested
    resource.</p>
  </blockquote>
  
  <p>if i change the kml so that the image is instead using the url <a href="https://maps.google.com/mapfiles/kml/shapes/snowflake_simple.png" rel="nofollow noreferrer">https://maps.google.com/mapfiles/kml/shapes/snowflake_simple.png</a> , it shows up fine without any issues.</p>
  
  <p>I'm trying to find out how to use url rewrite to add the 'Access-Control-Allow-Origin' to the first/bad link, but nothing i'm trying is working.  <a href="https://kamranicus.com/posts/2016-03-06-cors-multiple-origins-iis" rel="nofollow noreferrer">https://kamranicus.com/posts/2016-03-06-cors-multiple-origins-iis</a> seemed promising, but it hasn't worked for me.  if i use an extension like <a href="https://mybrowseraddon.com/access-control-allow-origin.html" rel="nofollow noreferrer">https://mybrowseraddon.com/access-control-allow-origin.html</a>, that fixes the problem, but that's not a real solution for my situation.</p>
  
  <p>What's the best way to show KML images that aren't set up for CORS in openlayers?</p>