簡體   English   中英

Firebase 托管:重寫為 function 無效

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM