CDN Mesh Delivery delivery works on top of the origin and CDN of your choice. Use this page to configure your Amazon CloudFront and S3 to work effectively with Mesh Delivery.
What you need to configure
-
Enable CORS
-
Allow RANGE & OPTIONS requests
Configurations for Amazon CloudFront
Amazon CloudFront forwards your Origin headers. It is required to set them properly on your Origin but you will still have to allow OPTIONS requests. To make sure CloudFront forwards all the Origin headers, follow these steps:
-
In the CloudFront portal, click on Distribution Settings for the distribution you want to configure.
-
In the Behaviors tab, click on Edit for the Cache Behavior you want to configure.
-
Change your settings as below:
Configurations for Amazon S3 buckets
Easily edit your S3 buckets CORS configurations by following these steps:
-
In the Amazon S3 console, click on the Properties tab for the bucket you want to configure.
-
In the Permissions section, click on Edit CORS Configuration.
-
Paste the following XML in the text area:
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration>