IIS重写规则将覆盖响应中的cookie域

时间:2018-06-24 10:51:56

标签: iis

我正在为域.domain.comdomain.com设置cookie,但是下面的重写规则将cookie域更改为:dev.domain.com。 我可以防止重写更改响应Cookie域吗? 谢谢

<rewrite>
    <rules>
        <rule name="ReverseProxyInboundRule1" stopProcessing="true">
            <match url="(.*)" />
            <action type="Rewrite" url="http://localhost:54458/{R:1}" />
        </rule>
    </rules>
    <outboundRules>
        <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1" stopProcessing="true">
            <match filterByTags="A, Form, Img" pattern="^http(s)?://http://localhost:54458/(.*)" />
            <action type="Rewrite" value="http{R:1}://dev.domain.com/{R:2}" />
        </rule>
        <preConditions>
            <preCondition name="ResponseIsHtml1">
                <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
            </preCondition>
        </preConditions>
    </outboundRules>
</rewrite>

0 个答案:

没有答案