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

标签 azure policy azure-api-management

https://learn.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> 

我们什么时候在政策中使用后端部分?

看起来设置后端 URL 也是在 <inbound> 上完成的仅节点。

感谢您的宝贵时间。

最佳答案

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

关于Azure APIM 策略 - 何时使用 <backend> </backend>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54055822/

相关文章:

azure - 无法从 Azure 函数应用连接 Azure Database for PostgreSQL 服务器

Java读取文件权限

azure - 是否可以匿名调用API App并自动将浏览器重定向到AD登录页面?

api - Azure API 管理 - API 端点域与实际 API URL

Azure API 管理和后端 Web API

用于容器状态存储的 Azure Web App

c# - 找不到方法 : Microsoft. WindowsAzure.ServiceModel.Service.set_IsSLBPartialGS(Microsoft.WindowsAzure.ServiceModel.Expression)

azure - 我需要通过用户身份验证连接到 Azure 媒体服务

node.js - 如何避免 Sails.js 策略和 Controller 的多个数据库访问?

java - 我可以通过配置 java.policy 文件来拒绝对 jvm 类的访问吗?