I have static content that is being served by Cloudflare. Cloudflare points to Amazon S3 to pick up the static content and serves it via a CNAME (cdn.mydomain.com). The bucket is setup properly and everything was working fine for months until Friday when I started getting requests timing out in my browser. I verified that the content was still accessible via S3 and opened a ticket with Cloudflare. Cloudflare reported that "it does appear something at Amazon is likely blocking requests from our IPs" and that they were seeing the following messages in their logs:
upstream timed out (110: Connection timed out) while reading response header from upstream cdn.mydomain.com upstream prematurely closed connection while reading response header from upstream cdn.mydomain.com
Here is what I already had in my CORS file.
<CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <MaxAgeSeconds>3000</MaxAgeSeconds> <AllowedHeader>Authorization</AllowedHeader> </CORSRule>
Should I put a * in AllowedHeader? Do I need to explicitly name the Cloudflare IP addresses? What am I missing to avoid the block?