Skip to content

Conversation

seang96
Copy link

@seang96 seang96 commented Sep 26, 2019

I added an option to restrict access to S3, but it is still allowed through CloudFront. In addition to this, I added support for placing error pages through CloudFront to continue supporting them.

Below is an example of the new configurable variables.

custom:
  fullstack:
    restrictS3Access: true
    restrictS3ErrorResponses:
      - ErrorCode: 404
        ResponsePagePath: /404.html
      - ErrorCode: 403
        ResponsePagePath: /403.htm

@andrewphahn
Copy link

Thank you! This looks awesome. Please add a section to the README to document how to use it, then we can get it merged.

Copy link

@andrewphahn andrewphahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one small change with a copy and pasted for loop.

Also, please add a section to the readme documenting how and why to use this.

Comment on lines +450 to +454
for (let origin of distributionConfig.Origins) {
if (origin.Id === 'WebApp') {
delete origin.CustomOriginConfig;
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refactor to remove duplicated code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants