Created
February 22, 2014 22:33
-
-
Save trailmax/9163437 to your computer and use it in GitHub Desktop.
Securing your cookies and STS header in web.config transformation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | |
<system.web> | |
<compilation xdt:Transform="RemoveAttributes(debug)" /> | |
<httpCookies httpOnlyCookies="true" requireSSL="true" lockItem="true" xdt:Transform="Replace" /> | |
<authentication mode="Forms"> | |
<forms loginUrl="~/Logon/LogOn" timeout="2880" requireSSL="true" xdt:Transform="Replace"/> | |
</authentication> | |
</system.web> | |
<system.webServer> | |
<httpProtocol> | |
<customHeaders> | |
<add name="Strict-Transport-Security" value="max-age=16070400; includeSubDomains" xdt:Transform="Insert" /> | |
</customHeaders> | |
</httpProtocol> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment