gpt4 book ai didi

python - 在 Firebase 托管中使用 Python Google Cloud Function

转载 作者:太空宇宙 更新时间:2023-11-04 04:00:54 24 4
gpt4 key购买 nike

我有一个名为“artificiellt_osterbotten”的 Python 谷歌云函数(不是 Firebase 函数),我想通过 Firebase 托管来触发它。这是我的 firebase.json 文件:

{
"hosting": {
"public": "public",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "/artificiellt_osterbotten",
"function": "artificiellt_osterbotten"
}
]
}
}

该路由似乎有效,但我得到的只是 404。我假设这与 Firebase 和 GCP 之间的断开连接有关。但是,该函数确实显示在 Firebase 控制台中。

有人知道这里的问题是什么吗?甚至可以从 Firebase 托管触发 GCP 云功能吗?

我已将我的 Firebase 计划升级到 Blaze。

最佳答案

事实证明,我只需要将函数置于 us-central1 中即可运行。希望它可以在 CLI 中警告我,这样可以节省我几个小时!

对于 future 的读者,有一个 open issue firebase 正在处理此问题,看来要么会发出警告,要么会提供多区域支持。

关于python - 在 Firebase 托管中使用 Python Google Cloud Function,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58363466/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com