我试图通过web.config在我们所有的cookies中添加相同的站点:none。我已经使用重写规则尝试了以下操作,但都没有用:
<outboundRules>
<rule name="Add SameSite None">
<match serverVariable="RESPONSE_Set_Cookie" pattern=".*" negate="true" />
<action type="Rewrite" value="{R:0}; SameSite=none" />
</outboundRules>发布于 2020-02-18 23:20:07
尝试以下操作:
<rewrite>
<outboundRules>
<rule name="Add SameSite" preCondition="No SameSite">
<match serverVariable="RESPONSE_Set_Cookie" pattern=".*" negate="false" />
<action type="Rewrite" value="{R:0}; SameSite=none" />
<conditions>
</conditions>
</rule>
<preConditions>
<preCondition name="No SameSite">
<add input="{RESPONSE_Set_Cookie}" pattern="." />
<add input="{RESPONSE_Set_Cookie}" pattern="; SameSite=none" negate="true" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>https://stackoverflow.com/questions/59484409
复制相似问题