![](/img/trans.png)
[英]Firebase base hosting rewrite rules to function - "Cannot GET"/"Cannot POST"
[英]Firebase hosting: Rewrite to function not working
我的firebase.json
:
{
"hosting": [
{
"target": "dev",
"public": "public",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"function": "ssr",
"region": "europe-west1"
}
]
}
],
}
我正在嘗試重寫到我的ssr
function 的任何流量。每當我嘗試訪問我的網站時,我都會收到 404 Error: Page not found
並且The requested URL was not found on this server.
我已經成功部署了ssr
function。如果我直接訪問它的 URL,function 就可以工作。 但出於某種原因,firebase 重寫無法正常工作。
我錯過了什么?
我正在部署我的功能並單獨托管,例如firebase deploy --only functions
。 當我嘗試同時部署它們時,即僅運行firebase deploy
它就可以了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.