最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

google cloud run - Firebase rewrite to run service leading to "not found" page - Stack Overflow

programmeradmin5浏览0评论

When I try to call a rewrited route to a Run Container I got a not found page.

If I call this Run Container from it's URL it's working fine so I think it's something I'm missing or maybe a bug with rewrites.

Here's my firebase.json config:

"hosting": [
  {
    "public": "wiki/api",
    "target": "api",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "/",
        "destination": "/index.html"
      },
      {
        "source": "/admin{,/**}",
        "function": {
          "functionId": "admin",
          "region": "southamerica-east1"
        }
      },
      {
        "source": "/gotenberg{,/**}", // this is the rewrite that's not working
        "run": {
          "serviceId": "gotenberg",
          "region": "southamerica-east1"
        }
      },
      {
        "source": "/**",
        "function": {
          "functionId": "api",
          "region": "southamerica-east1"
      }
    }
  ]
}

All my other rewrites are working fine. I think it's because I'm rewriting to Functions (even if all functions are in v2 and they are showing inside Cloud Run section on console).

What am I missing?

发布评论

评论列表(0)

  1. 暂无评论