aws-samples / amazon-cloudfront-secure-static-site

Create a secure static website with CloudFront for your registered domain.
Apache License 2.0
385 stars 140 forks source link

Update bucket policy for serving SPA with logical routes #36

Open rspitler opened 3 years ago

rspitler commented 3 years ago

Add policy statement to allow CloudFront OriginAccess Identity to ListBucket. This means that when a unknown object is requested it returns a 404 instead of a 403. For SPA hosted by CloudFront this allows for the custom error logic to serve the SPA instead of a 404 page for a logical route.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.