amazon-cloudfront
Force CloudFront distribution/file update
Good news. Amazon finally added an Invalidation Feature. See the API Reference. This is a sample request from the API Reference: POST /2010-08-01/distribution/[distribution ID]/invalidation HTTP/1.0 Host: cloudfront.amazonaws.com Authorization: [AWS authentication string] Content-Type: text/xml <InvalidationBatch> <Path>/image1.jpg</Path> <Path>/image2.jpg</Path> <Path>/videos/movie.flv</Path> <CallerReference>my-batch</CallerReference> </InvalidationBatch>
Font from origin has been blocked from loading by Cross-Origin Resource Sharing policy
Add this rule to your .htaccess Header add Access-Control-Allow-Origin “*” even better, as suggested by @david thomas, you can use a specific domain value, e.g. Header add Access-Control-Allow-Origin “your-domain.example”
Serving gzipped CSS and JavaScript from Amazon CloudFront via S3
UPDATE: Amazon now supports gzip compression, so this is no longer needed. Amazon Announcement Original answer: The answer is to gzip the CSS and JavaScript files. Yes, you read that right. gzip -9 production.min.css This will produce production.min.css.gz. Remove the .gz, upload to S3 (or whatever origin server you’re using) and explicitly set the Content-Encoding … Read more