We use S3 to store our images for Wecora.com. We have a bucket setup called cdn-production and have are using S3's ability to interpret a CNAME with cdn-production.wecora.com to avoid CORS issues. Lastly, we are using HTML5 Canvas in our application to display images.
With that all said, we are getting daily reports from random users using everything from Chrome to Safari to iPads and Android reporting that images are not loading on their HTML5 canvas! We cannot duplicate these issues locally when we try to load their saved canvases, but they send over screen shots that shot the images missing! It's driving us nuts!
The only thing we can think is that it's a weird CORS issue but we cannot replicate. Below is our CORS and bucket policy. Has anyone else seen this type of intermittent missing image behavior (possibly access denied, possibly something else)
Our CORS policy is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://ift.tt/1f8lKAh">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
and our bucket policy is thus:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::cdn-production.wecora.com/*"
}
]
}
Aucun commentaire:
Enregistrer un commentaire