firebase - 将 Firebase SSL 托管用于两个不同的 Web 应用程序

标签 firebase firebase-hosting

看来我只能将一个顶级域 (TLD) 与一个 firebaseapp SSL 托管关联。这是真的吗?

例如,我想要 https://x.example.com去我的https://x.firebaseapp.comhttps://y.example.com去我的https://y.firebaseapp.com

当我尝试时,我看到:(参见下图)(我正在将 https://city.tidalforce.org/ 用于 https://cityregister.firebaseapp.com/ 上的不同 firebase 应用程序,但我想对另一个全名的应用程序使用相同的域,例如https://y.tidalforce.org

这可能吗?

enter image description here

最佳答案

简而言之,不,尽管您可以在不同的子文件夹中托管不同的应用程序,例如 https://example.com/x , https://example.com/y例如,如果他们有 javascript 路由器,如果您使用 Angular 作为前端并使用 Angular-router 或其他东西,您将需要提供适当的重写规则,例如:

"rewrites": [ {
  "source" : "/x/**",
  "destination" : "/x/index.html"
},
{
  "source" : "/grid/**",
  "destination" : "/grid/index.html"
} ]

重写来自该文件夹的 url 请求以正确路由。

希望有帮助:)

关于firebase - 将 Firebase SSL 托管用于两个不同的 Web 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37526080/

相关文章:

javascript - 根据用户事件在 Firebase 托管中自动创建新页面 (JAVASCRIPT)

ios - 想要在 firebase 身份验证完成后调用方法

Firebase Cloud Functions - 删除时间戳字段超过一个月的条目并每天运行

firebase - 为什么身份验证不能在自己的域上工作,但可以在 firebase 的域上工作?

Firebase:在进行 Firebase 部署后站点未更新

java - 使用 GeoFirestore 的 Firestore 中的数据结构

node.js - 如何在 firebase 上使用带有 Handlebars 模板引擎的 Node js 托管我的 Web 应用程序

Firebase 自定义域名

Firebase 托管,创建 404 页面

firebase - 如何在Flutter Firestore中编辑用户