Firebase托管重写在本地工作,但不在云中工作-bug?
这是我的Firebase托管重写在本地工作,但不在云中工作-bug?,firebase,firebase-hosting,Firebase,Firebase Hosting,这是我的firebase.json文件: { "hosting": { "target": "md-viewer", "public": "public", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ], "rewrites": [ { "source": "/", "destination": "crea
firebase.json
文件:
{
"hosting": {
"target": "md-viewer",
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "/",
"destination": "create_md.html"
},
{
"source": "/view/*",
"destination": "show_md.html"
}]
}
}
运行firebase-service
时,重写工作正常。但是,部署并打开我的应用程序(“appname.firebaseapp.com
”)会返回404
。部署是成功的,因为我可以自定义404页面,并通过直接请求来访问我的文件(appname.firebaseapp.com/show_md.html
)
怎么了?firebase服务是否应该镜像联机行为?如果重写规则上的“目的地”键是文件,则必须使用绝对路径引用它:
"rewrites": [
{
"source": "/",
"destination": "/create_md.html"
},
{
"source": "/view/**",
"destination": "/show_md.html"
}]
此外,“/视图”重写需要两个星号,根据