如何更改 webapi odata v3 中的服务根目录?

How to change the service root in webapi odata v3?

已使用 Microsoft.AspNet.WebApi.OData 实现 webapi odata v3 端点,在 API 管理下公开,如何更改服务根路径,而不是 returning azurewebsite 一 return api 管理 URL.

尝试在出站策略中使用 <redirect-content-urls/> 策略来更新 URL。如果这不能满足您的需要,您可以使用 <find-and-replace/> 策略。 https://docs.microsoft.com/en-us/azure/api-management/api-management-transformation-policies#MaskURLSContent