gpt4 book ai didi

reactjs - 使用 s3_website gem 在 S3 托管上使用 React 应用程序破坏路由

转载 作者:行者123 更新时间:2023-12-03 13:58:41 26 4
gpt4 key购买 nike

我正在使用S3_website gem 将 react 构建推送到我的桶中。一切都很好,但是当我导航到自定义 url 并点击刷新时,我收到 404 错误,因为它尝试在存储桶中查找此对象而不是执行路由。

我在 s3_website yml 中有默认配置,没有重定向规则。

site: dist
index_document: index.html
error_document: error.html
s3_endpoint: us-east-2
cloudfront_wildcard_invalidation: true

enter image description here

我缺少什么配置?

最佳答案

错误文档下的存储桶属性中,只需使用与索引文档相同的文件,该文件应该是您的index.html

关于reactjs - 使用 s3_website gem 在 S3 托管上使用 React 应用程序破坏路由,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48854822/

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