aws-samples / retail-demo-store

AWS Retail Demo Store is a sample retail web application and workshop platform demonstrating how AWS infrastructure and services can be used to build compelling customer experiences for eCommerce, retail, and digital marketing use-cases
MIT No Attribution
726 stars 515 forks source link

Add Custom error response to Cloudfront distribution to allow page refresh #519

Closed gfaires closed 1 year ago

gfaires commented 1 year ago

Issue #, if available:

456

Description of changes: Created custom error response to intercept 403 errors and convert into a 200 /index.html. This allows you to perform a page refresh, that currently doesn't work as the frontend is an SPA. Description of testing performed to validate your changes (required if pull request includes CloudFormation or source code changes): Tested cloudfront deployment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.