我们在firebase托管上使用自定义域:我们的应用程序从index.html提供,在app.example.com上运行良好 . 我们还连接了www.example.com,它也为应用程序提供服务 .
问题是:在www.example.com上我希望能够托管一个简单的静态页面 . 有没有办法在重写中配置它?我们可以在部署中轻松输出额外的html文件,在index.html旁边 .
有任何想法吗?
我们的firebase.json:
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "public",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
1 回答
Firebase Hosting目前不支持单个项目中的多个站点 . 但是,您可以为静态登录页面创建第二个项目并将其部署到那里,将其连接到www域,同时将应用程序域连接到另一个项目 .
截至2018年8月,Firebase Hosting支持单个项目上的多个站点!有关详细信息,请参阅the docs .