Created
July 13, 2017 15:14
-
-
Save styfle/e5e54cb3156088b37729a626e1301b74 to your computer and use it in GitHub Desktop.
Security and Caching settings for web.config in ASP.NET
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
<system.web> | |
<httpCookies requireSSL="true" /> | |
</system.web> | |
<system.webServer> | |
<httpProtocol> | |
<customHeaders> | |
<add name="Strict-Transport-Security" value="max-age=31536000"/> | |
<add name="X-XSS-Protection" value="1; mode=block"/> | |
<add name="X-Content-Type-Options" value="nosniff"/> | |
</customHeaders> | |
</httpProtocol> | |
<staticContent> | |
<remove fileExtension=".js.map" /> | |
<mimeMap fileExtension=".js.map" mimeType="application/json" /> | |
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1000.00:00:00" /> | |
</staticContent> | |
</system.webServer> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment