gpt4 book ai didi

reactjs - CloudFront错误: This XML file does not appear to have any style information associated with it

转载 作者:行者123 更新时间:2023-12-03 13:37:46 25 4
gpt4 key购买 nike

我有一个在 AWS S3 和 CloudFront 上运行的 React 应用程序。当我从给定的 URL 访问该应用程序时,它可以正常打开主页。当我使用导航栏上的按钮导航到另一个页面时,它可以很好地打开页面。但如果我刷新页面,就会收到此错误:

enter image description here如果我尝试通过特定路径(例如 www.website.com/blog)导航到该页面,我也会遇到同样的错误。 。

如果我直接从 S3 对象 URL 访问网站,一切都会正常。页面重新加载,我可以使用直接路径打开页面。这让我相信问题出在 CloudFront 上。但是我不知道从哪里开始调试这个问题。

S3 设置: enter image description here

最佳答案

您必须将 S3 索引 url 和 S3 错误 url 设置到您的索引页。尝试一下

关于reactjs - CloudFront错误: This XML file does not appear to have any style information associated with it,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44741287/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com