Pin*_*ong 4 azure azure-api-management
是否可以在策略内获取下面指定的 url 部分:
<policies>
<inbound>
<base />
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
<find-and-replace from="https://thirdparty/certs"
to="@(specified url part)" />
</outbound>
<on-error>
<base />
</on-error>
</policies>
Run Code Online (Sandbox Code Playgroud)
请注意,整个 URL 可能包含版本控制和前缀。
Vit*_*tin 11
整个 URI(假设https://contoso.com/myapi/.wellknown/openid-config)由以下部分组成:
context.Request.OriginalUrl.Schemecontext.Request.OriginalUrl.Hostcontext.Request.OriginalUrl.Portcontext.Api.Path所以 URL 的操作部分可以通过类似的方式计算:context.Request.OriginalUrl.Path.Trim('/').Substring(context.Api.Path.Trim('/').Length)
| 归档时间: |
|
| 查看次数: |
12219 次 |
| 最近记录: |