CloudFront Error: This XML file does not appear to have any style information associated with it [duplicate]

戏子无情 提交于 2020-04-13 05:29:17

问题


I have a React app that runs on AWS S3 and CloudFront. When I access the app from the given URL it opens the home page fine. When I navigate to another page using a button on the nav bar it opens the page just fine. But if I then refresh the page I get this error:

I also get that same error if I attempt to navigate to the page via a specific path such as www.website.com/blog.

If I access the website straight from the S3 object URL everything works just fine. Pages reload and I can use direct paths to open a page. This leads me to believe the issue lies in CloudFront. However I have no idea where to start in debugging that issue.

S3 setup:


回答1:


You have to set the S3 index url and S3 error url to your index page..try it



来源:https://stackoverflow.com/questions/44741287/cloudfront-error-this-xml-file-does-not-appear-to-have-any-style-information-as

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!