【发布时间】:2022-12-10 15:09:03
【问题描述】:
我在自定义域上部署了我的 flutter 应用程序,但是当我尝试访问该域时,我得到了 firebase 站点未找到页面 this is what I get when I put in my url
当我进入域 firebase 时,页面加载就像正常一样,当我打开 vpn 时,页面加载到自定义域。如果我在 url 的 / 后面放一些东西,页面也会像正常一样加载,所以我会做“app.domain.com/(任何随机词都有效,所以 home 或 random 等)”,它会将我重定向到主页。 when I enter the url with something behind the /
我尝试在多个设备和浏览器上加载页面,删除使用过的浏览器的 cookie 和缓存,使用隐身模式。但似乎没有任何效果。我也试过在不同的位置加载页面,但仍然弹出“找不到站点”。
我也尝试清理我的项目,再次获取我的包并升级它们
flutter clean、flutter pub get和flutter pub upgrade。
删除了我的 firebase 主机文件并再次运行firebase init。
真是太奇怪了,当连接到 vpn 或在 url 后给定一个随机字符串时,找不到该页面。我还就我的问题联系了谷歌,但他们似乎也无法找到它,因为当支持员工和他的团队尝试时页面加载正确
有人可以帮我吗?
我的 firebase.json 文件
{
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"hosting": {
"public": "build/web",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
【问题讨论】:
标签: flutter firebase http-status-code-404 firebase-hosting custom-domain