我使用区域创建了我的 firebase 云函数:asia-northeast1,我正在尝试使用 firebase.json 文件触发其中一个函数。
"hosting": [
{
"target": "ksite",
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{ "source": "**", "function": "ssr" }
]
}
]
不幸的是,这会触发区域为us-central1
https://us-central1-site.cloudfunctions.net/ssr/而不是asia-northeast1
类似https://asia-northeast1-site.cloudfunctions.net/ssr/ 的功能
这是如何以及为什么发生的?
这是我的功能:
// For Universal Rendering
export const ssr = functions.region('asia-northeast1').https.onRequest((request, response) => {
require(`${process.cwd()}/dist/ksite-webpack/server`).app(request, response);
});
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句