-
Notifications
You must be signed in to change notification settings - Fork 53
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
Installation on existing S3 CloudFront CI/CD #26
Comments
@cjkeatley Were you able to do it? Let me know and I can guide you. |
@acabreragnz After trying to make it work for a couple of days I switched to a service-based solution > headless-render-api. |
@cjkeatley there we go, let me know if you have any doubts. Change the CloudFront distribution behaviorsGo to the CloudFront distribution, Behaviors tab, and edit the existing behaviorChange to Legacy cache settings and add these custom headersOn the same page at the bottom
This an example of how to copy the ARN of the
|
@acabreragnz I was able to do this for the the React SPA we're serving through an s3 static site bucket. Our SPA handles the routing on the client side. So if someone loads any page but the homepage, they'll get a 404 cause we don't have static index.html files for all the pages. Have you been able to handle this, cause it cases a cache miss and Prerender doesn't cache the page due to the 404 response. |
Hey @ysabri, mine is a Vue SPA Do you have these error pages in place? |
@acabreragnz This worked! Thank you so much. Trying to figure out images from S3, only one loads from behind my CloudFront dist. I removed all the origin access constraints. |
@acabreragnz You're right, assets served from the CloudFront website distribution are working just fine. Its other images that we retrieve after loading an API call, they're in a different bucket. I tried setting the window.prerenderReady = true once they load, but still for some reason, the captured html has only one every time. Not sure if its the right place to ask anymore but you've been so helpful, so thank you again. |
I found the solution, there is a setting where you tell the bot to wait for images, it works now. |
@acabreragnz: Thanks for your step-by-step guide to integrate it in an existing project. |
Hi, Could you please explain why in a Cloudfront prerenderer integration we do not need any function associations in the behavior for Origin Response and Viewer Response? |
I would like to implement this as a solution for my current site, however I'm not certain how to use the example as it sits. Is there a installation guide that would walk me through implementing on an existing S3 CloudFront hosted site?
The text was updated successfully, but these errors were encountered: