Skip to content

Commit

Permalink
Merge pull request #1 from jlaramie/develop
Browse files Browse the repository at this point in the history
Fix CloudFront not serving the default indexDocument but instead it w…
  • Loading branch information
andrewphahn authored Jul 1, 2018
2 parents 7584c5d + d065e24 commit 253c6fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@ class ServerlessFullstackPlugin {
}
}

// Cloudfront default root object
distributionConfig.DefaultRootObject = indexDocument;

// Remove public read access to bucket, as all access is through the API for single page apps
const statements = resources.WebAppS3BucketPolicy.Properties.PolicyDocument.Statement;
resources.WebAppS3BucketPolicy.Properties.PolicyDocument.Statement = _.filter(statements, (statement) => {
Expand Down

0 comments on commit 253c6fa

Please sign in to comment.