Azure APIM策略-何时使用<backend> </backend>

时间:2019-01-05 20:09:25

标签: azure policy azure-api-management

https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-policies

    <policies>
  <inbound>
    <!-- statements to be applied to the request go here -->
  </inbound>
  <backend>
    <!-- statements to be applied before the request is forwarded to 
         the backend service go here -->
  </backend>
  <outbound>
    <!-- statements to be applied to the response go here -->
  </outbound>
  <on-error>
    <!-- statements to be applied if there is an error condition go here -->
  </on-error>
</policies> 

我们何时在政策中使用后端部分?

看起来也仅在<inbound>节点上设置了使用后端网址。

感谢您的时间。

1 个答案:

答案 0 :(得分:0)

该部分用于在将请求转发到后端之前对请求进行任何转换\检查,例如,我正在向请求添加标头并验证oauth令牌。