当我调用Firebase Cloud函数https请求时,它将重定向到 account.google.com/ServiceLogin?service=ah&passive=true&continue={my-cloud-function-http-url}
这是我的firebase.json(托管配置)
...
"hosting": {
"public": "client/dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "/api/v1/**",
"function": "midleman"
},
{
"source": "**",
"destination": "/index.html"
}
],
"trailingSlash": false
},
...
是Google Firebase的错误还是我错过了配置?
答案 0 :(得分:0)
当您尝试访问的 URL 无法访问 (404 Not Found
) 时,通常会发生这种情况。确保您在 HTTP 客户端中输入了正确的 URL,然后重试。
例如,您正在尝试访问 https://us-central1-[project_id].cloudfunctions.net/london
但您输入了 https://us-central1-[project_id].cloudfunctions.net/new-york
。如果最新的不是有效的函数名称,您将被重定向到 Google 登录页面。