-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add single-page-app construct #175
Add single-page-app construct #175
Conversation
7731a27
to
08aebf3
Compare
Thank you for opening this! I'll review this tomorrow! Just a question because I got lost with #172: is this PR using Lambda@Edge? From a quick search it doesn't seem so. |
No 😃 ! I managed to make the SPA redirection work by only adding a cloudfront function triggered by the viewer request event. |
Amazing! |
08aebf3
to
0aa3173
Compare
928ad8c
to
3faf11d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing all this so quickly!
cc @fredericbarthelet if you want to review
I'll try out the component early next week (just to be sure) but except that I'm all good here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adriencaccia thanks for putting this PR together :)
LGTM, except a few minor comments and e5da8c9 that can then be reverted to reduce boilerplate and avoid confusion on which mechanism is in place to redirect to index (in the PR current state, it looks like both Cloudfront and S3 are in charge of the redirect)
FYI I just tested deploying the construct and 👌 perfect. |
Thanks for the review ! One problem though, reverting e5da8c9 will not be enough, we will also need to add custom OAI as stated in my comment in the corresponding issue. So I see a tradeoff here between:
The current solution (website hosting) is the one with less boilerplate in my opinion. What do you think ? |
@adriencaccia as seen together, reverting back to OAI and private bucket (removing website hosting on S3 bucket) will work as intended with your new Cloudfront function redirecting SPA path to Thanks again for your contribution, let me know if @mnapoli and I can help in any way. |
+1, yes I'd say OAI has a great advantage (private bucket). If we can get these things ☝️ IMO we're good to go! |
This is a manual revert of getlift@e5da8c9
3faf11d
to
21a9aab
Compare
Hey @mnapoli @fredericbarthelet ! I made all the changes we talked about! The construct is working properly on my end, can you test it ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adriencaccia LGTM :) !
Thanks for your contribution. I'll merge and release a new version of Lift right away.
🎉 thanks @adriencaccia! |
Fix #172