CORS issues with CloudFront and S3
<p>Some of our users are getting this error in the browser consoles:</p>

<pre><code>XMLHttpRequest cannot load https://d2ynz9y5qgba7.cloudfront.net/icons/instagram.svg.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'https://www.weld.io'; is therefore not allowed access.
</code></pre>

<p>These are the current headers:</p>

<pre><code>Accept-Ranges: bytes
Access-Control-Allow-Methods: GET
Access-Control-Allow-Origin: *
Age: 21038
Content-Length: 1086
Content-Type: image/svg+xml
Date: Wed, 23 Mar 2016 10:00:12 GMT
Etag: "5cc3b790e15d7736b95880001521630b"
Last-Modified: Wed, 18 Mar 2015 10:20:32 GMT
Server: AmazonS3
Via: 1.1 8cdc69e06e564b9aef153cf0b52204b0.cloudfront.net (CloudFront)
X-Amz-Cf-Id: 0lD_0czYTm6i5f7RlURkG2dcQx_B252LC2GOu98anzHH1k1eaz2lmg==
X-Cache: Hit from cloudfront
</code></pre>

<p>As you can see, <code>Access-Control-Allow-Origin</code> is indeed present.</p>

<p>We are also "whitelisting" <code>Origin</code> on CloudFront.</p>

<p>What could be the cause of this issue?</p>