小编Pul*_*lka的帖子

我可以在 Azure 静态 Web 应用程序中使用通配符进行重定向吗?

我正在尝试将 API 调用从静态 Web 应用程序重定向到另一个函数应用程序,但我无法使用通配符。

路线匹配正确,但我希望该*部分包含在重定向中。这是我的一个例子staticwebapp.config.json

  {
        "route": "/api/client/*",
        "redirect": "https://xx.yy.net/api/client/*"
  }
Run Code Online (Sandbox Code Playgroud)

我希望请求/api/client/customer/get?customerId=xx成为https://xx.yy.net/api/client/customer/get?customerId=xx.

但无论我尝试什么,它都只是硬路由到我在重定向中放入的内容。通过代理,这可以通过函数实现,但我无法在静态 Web 应用程序中找到方法。

routes azure azure-static-web-app

5
推荐指数
1
解决办法
1123
查看次数

标签 统计

azure ×1

azure-static-web-app ×1

routes ×1