1
在Azure的API管理,我試圖修改CORS策略API中的單一路線。我遇到的問題是我無法弄清楚如何修改BASE策略。 Azure似乎簡單地用新策略覆蓋它。如何修改Azure API基本策略而不完全覆蓋它?
簡單的基本政策:
<policies>
<inbound>
<cross-domain>
<cross-domain-policy>
<allow-http-request-headers-from domain="*" headers="*" />
</cross-domain-policy>
</cross-domain>
<cors>
<allowed-origins>
<origin>*</origin>
</allowed-origins>
<allowed-methods>
<method>*</method>
</allowed-methods>
<allowed-headers>
<header>*</header>
</allowed-headers>
</cors>
</inbound>
<backend>
<forward-request />
</backend>
<outbound>
</outbound>
</policies>
在具體的路線,我想修改<cors>
部分包括一個或多個政策,如:
<policies>
<inbound>
<base />
<cors>
<expose-headers>
<header>Content-Disposition</header>
</expose-headers>
</cors>
</inbound>
</policies>
然而,天青要覆蓋基於這一個CORS策略。我無法在文檔中找到有關如何修改/合併策略而不是批量替換它的任何內容。
所以,我將如何繼承基本政策,但只需添加這一項額外的<expose-headers>
政策?