How do you set the Access-Control-Allow-Origin header of an S3 object using version 1 of the AWS SDK for Ruby. The docs here show how to set a variety of headers, but there doesn't seem to be anything for the access control header. It does mention a :metadata option, but that prefixes the values with x-amz-meta, which is not what I'm looking for.
The reason I ask is because I'm trying to download a publicly readable file in S3 (which I put there) by making an Ajax call from Javascript. I have set the ACL to public read, which means I can view it in a browser, but I get the No 'Access-Control-Allow-Origin' header is present on the requested resource error from the Ajax call.
Aucun commentaire:
Enregistrer un commentaire