【发布时间】:2022-01-18 16:11:57
【问题描述】:
我正在使用以下代码
<validate-content unspecified-content-type-action="prevent" max-size="102400" size-exceeded-action="prevent" errors-variable-name="requestBodyValidation">
<content type="application/json" validate-as="json" action="ignore" />
</validate-content>
在 api 管理策略中,但是当我发送 Content-Type 为 application/json 的请求时,我收到错误 Unspecified content type application/json is not allowed
不确定问题或我对政策的理解有误。
有什么建议或解决方案吗?
【问题讨论】:
-
能否请您添加一个示例/重现您正在尝试验证的消息以及使验证失败无法进一步分析并帮助我们您是否正在执行任何 GET 或 DELETE 操作?
标签: azure validation content-type azure-api-management policies