【发布时间】:2020-05-27 17:35:55
【问题描述】:
到目前为止,据我所知,使用 Azure 函数代理的唯一方法是重新路由现有 api,即直接调用该 api。例如:
后端网址
https://gateway-api.com/api/getSomething
路线模板
/api
代理网址
https://gateway.azurewebsites.net/api
我想要的是让后端 URL 通过相对于主端点的任何端点。
实际上是这样的:
后端网址
https://gateway-api.com/* 或者我什至尝试过这个https://gateway-api.com/{*restOfPath}
这样,任何跟随核心域 URL 的 api 仍将按预期工作。
这是对上面示例的重写:
后端网址 2
https://gateway-api.com/*
路线模板 2
/*
代理网址 2
https://gateway.azurewebsites.net/api/getSomething
当我这样做时,我无法让它工作,甚至无法到达调试器来记录任何内容。
这可能吗?如果不是,这是否是 Azure API 管理能够完成的事情?
【问题讨论】:
-
您检查过 Azure 前门吗?
标签: azure azure-functions azure-api-management azure-function-app-proxy azure-functions-proxies