【问题标题】:Azure APIM as pure proxyAzure APIM 作为纯代理
【发布时间】:2017-08-14 01:52:12
【问题描述】:

我正在尝试处理没有可通过 Azure APIM 访问的招摇文档的后端 API(REST)。 我希望所有调用都定向到后端 API,而不是为所有资源手动创建 GET/PUT/POST。我的所有操作的入站策略如下 '

<policies>
  <inbound>
    <set-variable name="requestPath" value="@(context.Request.Url.Path)" />
    <base/>
    <set-backend-service base-url="https://*****/****/" />
    <rewrite-uri template="@(context.Request.Url.Path)" copy-unmatched-params="true" />
  </inbound>
  <backend>
    <base/>
  </backend>
  <outbound>
    <base/>
  </outbound>
</policies>

` 然而,当点击 APIM 时,我得到了

{ "statusCode": 404, "message": "Resource not found" } 任何帮助表示感谢谢谢

【问题讨论】:

    标签: azure azure-api-management


    【解决方案1】:

    执行此操作的简单方法是为您支持的每种 HTTP 方法创建一个操作,并为模板使用 /*。这将匹配任何入站路径/查询并将其转发到后端。

    【讨论】:

      猜你喜欢
      • 2020-09-07
      • 2022-12-06
      • 1970-01-01
      • 1970-01-01
      • 2020-01-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多