Advertisement
altair

HSTS setup in IIS

Dec 7th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 0.53 KB | None | 0 0
  1. <system.webServer>
  2.   <httpProtocol>
  3.     <customHeaders>
  4.       <add name="Strict-Transport-Security" value="max-age=31536000" />
  5.     </customHeaders>
  6.   </httpProtocol>
  7.   <rewrite>
  8.     <rules>
  9.       <rule name="HSTS" stopProcessing="true" enabled="true">
  10.         <match url="(.*)" />
  11.         <conditions>
  12.           <add input="{HTTPS}" pattern="^OFF$" />
  13.         </conditions>
  14.         <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
  15.       </rule>
  16.     </rules>
  17.   </rewrite>
  18. </system.webServer>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement