You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

APIM Validate-header策略对合法Permissions-Policy头部校验失败

APIM头部校验策略报错,但同值set-header策略正常
  • 后端返回的Permissions-Policy头部值:
"accelerometer=(),ambient-light-sensor=(),autoplay=(),camera=(),encrypted-media=(),fullscreen=(),geolocation=(),gyroscope=(),magnetometer=(),microphone=(),midi=(),payment=(),picture-in-picture=(),speaker=(),sync-xhr=(),usb=(),vr=()"
  • 配置的APIM头部校验策略:
<validate-headers specified-header-action="prevent" unspecified-header-action="ignore" />
  • APIM抛出异常:
响应中不能包含多个`Permissions-Policy`头部值。
  • 但使用相同值的set-header策略却能正常工作:
<set-header name="Permissions-Policy" exists-action="override">
    <value>@("accelerometer=(),ambient-light-sensor=(),autoplay=(),camera=(),encrypted-media=(),fullscreen=(),geolocation=(),gyroscope=(),magnetometer=(),microphone=(),midi=(),payment=(),picture-in-picture=(),speaker=(),sync-xhr=(),usb=(),vr=()")</value>
</set-header>

怀疑这是APIM的bug。


内容的提问来源于stack exchange,提问作者beast

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 07:50:59