Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: More configurability for CloudFront with StaticWebsite #93

Open
thekevinbrown opened this issue Feb 25, 2021 · 1 comment

Comments

@thekevinbrown
Copy link
Contributor

We use React Router on pages that we're deploying with StaticWebsite.

This means we're deploying a single index.html but all paths need to map to it so the client side routing can work. We normally do this like so:
https://hackernoon.com/hosting-static-react-websites-on-aws-s3-cloudfront-with-ssl-924e5c134455

e.g. set up a custom error page with a 200 response and index.html.

I'm proposing to expose errorConfigurations as an optional field in StaticWebsiteProps which we pass directly to the CloudFrontWebDistribution constructor.

Another alternative would be to expose something like cloudFrontSettings which allows users to override all CloudFront configuration as exposed by CDK directly with a spread, but that feels a bit heavy handed when we're only allowing a couple of options at the moment, hence the proposal above.

@hupe1980
Copy link
Member

Take a look at #70 .

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

No branches or pull requests

2 participants