【问题标题】:Use custom domain for Firebase Functions which is not in 'us-central1' region为不在 \'us-central1\' 区域的 Firebase Functions 使用自定义域
【发布时间】:2023-02-18 14:45:15
【问题描述】:

有没有办法为托管在非'us-central1' 区域的我的 Firebase 函数注册自定义域 例如我的 Firebase 函数看起来像这样:https://asia-southeast2-my-first-firebase-function/

我在 Firebase 文档上阅读了一篇与我的问题相关的文章 https://firebase.google.com/docs/hosting/functions

但 Firebase 托管仅支持 us-central1 中的 Cloud Functions。

【问题讨论】:

    标签: firebase google-cloud-platform dns cloud


    【解决方案1】:

    像这样导出你的功能

    exports.YOURFUNCTIONAME = functions
      .region("southamerica-east1")
      .https.onRequest(async (req, res) => {
    

    所以你的下一次部署将更新该地区

    【讨论】:

      猜你喜欢
      • 2021-04-10
      • 2017-09-20
      • 2019-11-01
      • 2019-12-24
      • 1970-01-01
      • 2021-12-13
      • 1970-01-01
      • 2020-01-29
      • 2019-01-17
      相关资源
      最近更新 更多