我正在尝试将 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 应用程序中找到方法。