【问题标题】:Use Firebase SSL Hosting for two different web applications将 Firebase SSL 托管用于两个不同的 Web 应用程序
【发布时间】:2016-05-30 12:47:51
【问题描述】:

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

例如,我想https://x.example.com 转到我的https://x.firebaseapp.com 和https://y.example.com 转到我的https://y.firebaseapp.com

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

这可能吗?

【问题讨论】:

    标签: firebase firebase-hosting


    【解决方案1】:

    简而言之,不,尽管您可以在不同的子文件夹中托管不同的应用程序,例如 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 请求以正确路由。

    希望对你有帮助:)

    【讨论】:

      猜你喜欢
      • 2021-09-19
      • 2018-08-15
      • 2023-02-21
      • 2019-11-20
      • 1970-01-01
      • 2018-12-21
      • 2020-12-20
      • 2020-08-16
      • 2015-05-07
      相关资源
      最近更新 更多