CloudFront
  • 12 Aug 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

CloudFront

  • Dark
    Light
  • PDF

Article summary

CloudFront

View source on GitHub

The CloudFront integration is done using Lambda@Edge functions. View the example here:https://github.com/prerender/prerender-cloudfront



Uncomment this section if you don't have a specific error page


CustomErrorResponses:
     - ErrorCode: 404
        ResponseCode: 200
        ResponsePagePath: /index.html


This section is useful for SPA, which doesn't have a specific error page and manages all routing by javascript.
So, in case the static file doesn't exist on the host, it returns 200 instead of 404 with default index.html and javascript in the browser manage URL path and shows a specific page or "not found" page





Was this article helpful?

What's Next