Skip to content

Instantly share code, notes, and snippets.

@abfo
Created August 11, 2024 23:03
Show Gist options
  • Save abfo/ff1f6e6ded7d67bde9ec55e3635aec88 to your computer and use it in GitHub Desktop.
Save abfo/ff1f6e6ded7d67bde9ec55e3635aec88 to your computer and use it in GitHub Desktop.
How to enable compression in CloudFront for S3 hosted content. Details at https://ithoughthecamewithyou.com/post/enable-gzip-compression-for-amazon-s3-hosted-website-in-cloudfront
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Authorization</AllowedHeader>
<AllowedHeader>Content-Length</AllowedHeader>
</CORSRule>
</CORSConfiguration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment