Danh hiệu: Kê Vương
Gia nhập: 23-01-2011(UTC) Bài viết: 2,113 Đến từ: HCM Thanks: 4 times Được cảm ơn: 300 lần trong 220 bài viết
|
Step 1: Enable HttpOnly Flag in IISMã:<system.web> ... <httpCookies httpOnlyCookies="true" requireSSL="true" /> ... </system.web> Step 2: Enable Secure Flag in IISMã:<system.webServer> <rewrite> <outboundRules> <rule name="Use only secure cookies" preCondition="Unsecured cookie"> <match serverVariable="RESPONSE_SET_COOKIE" pattern=".*" negate="false" /> <action type="Rewrite" value="{R:0}; secure" /> </rule> <preConditions> <preCondition name="Unsecured cookie"> <add input="{RESPONSE_SET_COOKIE}" pattern="." /> <add input="{RESPONSE_SET_COOKIE}" pattern="; secure" negate="true" /> </preCondition> </preConditions> </outboundRules> </rewrite> ... </system.webServer>
|