使用 Firebase 托管将参数发送到 Cloud Functions
Send parameters to Cloud Functions with Firebase Hosting
我正在使用两个 Firebase 服务:Cloud Functions 和 Firebase 托管。
根据文档,我可以使用 firebase.json :
在 Firebase 托管上配置 url
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"function": "showWebProduct"
}
]
}
}
所以,在我的例子中,当在路径 URL 上使用任何东西时,它会执行 showWebProduct
,但是是否可以将参数发送到此 Cloud 函数?我不喜欢任何在查询中显示带参数示例的资源。
谢谢
无法在托管配置中指定要包含在函数调用中的参数。相反,您应该将 Hosting 指向一个已经具备运行所需一切的功能。
如果您有需要它的特定用例,您应该 file a feature request with Firebase support。
我正在使用两个 Firebase 服务:Cloud Functions 和 Firebase 托管。 根据文档,我可以使用 firebase.json :
在 Firebase 托管上配置 url{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"function": "showWebProduct"
}
]
}
}
所以,在我的例子中,当在路径 URL 上使用任何东西时,它会执行 showWebProduct
,但是是否可以将参数发送到此 Cloud 函数?我不喜欢任何在查询中显示带参数示例的资源。
谢谢
无法在托管配置中指定要包含在函数调用中的参数。相反,您应该将 Hosting 指向一个已经具备运行所需一切的功能。
如果您有需要它的特定用例,您应该 file a feature request with Firebase support。