Hi,
So you hosted your Angular website in s3
Application work fine but in middle of any page if user hit Ctrl+ F5 or Reload angular app , S3 respond it with 403 forbidden.
Below are the step to fix the access denied error with S3 hosting Angular App.
Hope this will help
So you hosted your Angular website in s3
Application work fine but in middle of any page if user hit Ctrl+ F5 or Reload angular app , S3 respond it with 403 forbidden.
Below are the step to fix the access denied error with S3 hosting Angular App.
- Navigate to Edit Distribution
- Navigate to Error Pages Pane
- Add new "Create Custom Error Response"
- Select Error code to 403 forbidden
- Caching Minimum TTL to 0
- Customize Error Response to Yes
- Response Page path "/Index.html" {Entry page for angular including '/'}
- HTTP Response Code to 200:OK
- Invalidate the Cloudfront Cache
- Wait for some time and reload in browse to test it :)
Hope this will help
No comments:
Post a Comment