CORS headers are required when you want to use on a page fonts and scripts from another domain, or even from another sub-domain you own.
Allowing cross domain access in Amazon S3
The best option is to add CORS support to the entire bucket.
Open thebucket properties, and select the Permissions sections. There is a button marked "Edit CORS Configuration".
Accept the default configuration to allow unlimited access to the bucket, or edit it to your liking.
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Authorization</AllowedHeader>
</CORSRule>
</CORSConfiguration>
Alternatively, add the x-amz-meta-access-control-allow-origin meta data to all of the objects that need it
Allowing cross domain access in Apache httpd origin
Add the following line to your .htaccess file
Header set Access-Control-Allow-Origin "*"
This will set the entire folder and it's subfolders to allow CORS.
Comments
0 comments
Please sign in to leave a comment.