<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <customErrors defaultRedirect="GenericError.htm" mode="Off">
      <error statusCode="500" redirect="InternalError.htm"/>
    </customErrors>
  </system.web>
  <system.webServer>
    <defaultDocument>
      <files>
        <clear/>
        <add value="index.html"/>
      </files>
    </defaultDocument>
    <security>
      <requestFiltering removeServerHeader="true"/>
    </security>
    <httpProtocol>
      <customHeaders>
        <remove name="server"/>
        <remove name="X-Powered-By"/>
        <add name="Arr-Disable-Session-Affinity" value="true"/>
        <!-- <add name="Content-Type" value="charset=utf-8" /> -->
      </customHeaders>
    </httpProtocol>
    <staticContent>
      <remove fileExtension=".appcache"/>
      <mimeMap fileExtension=".appcache" mimeType="text/cache-manifest"/>
      <remove fileExtension=".woff"/>
      <mimeMap fileExtension=".woff" mimeType="application/font-woff"/>
      <remove fileExtension=".woff2"/>
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff"/>
      <remove fileExtension=".json"/>
      <mimeMap fileExtension=".json" mimeType="application/json"/>
      <remove fileExtension=".svg"/>
      <mimeMap fileExtension=".svg" mimeType="images/svg+xml"/>
      <remove fileExtension=".otf"/>
      <mimeMap fileExtension=".otf" mimeType="font/otf"/>
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="00:00:00"/>
    </staticContent>
    <urlCompression doStaticCompression="true" doDynamicCompression="true"/>
    <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" minFileSizeForComp="256">
      <staticTypes>
        <add mimeType="text/*" enabled="true"/>
        <add mimeType="message/*" enabled="true"/>
        <add mimeType="application/javascript" enabled="true"/>
        <add mimeType="application/atom+xml" enabled="true"/>
        <add mimeType="application/xaml+xml" enabled="true"/>
        <add mimeType="*/*" enabled="false"/>
      </staticTypes>
      <dynamicTypes>
        <add mimeType="text/*" enabled="true"/>
        <add mimeType="message/*" enabled="true"/>
        <add mimeType="application/javascript" enabled="true"/>
        <add mimeType="*/*" enabled="false"/>
      </dynamicTypes>
      <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/>
    </httpCompression>
    <rewrite>
      <rules>
        <clear/>
        <rule name="AngularJS Routes" stopProcessing="true">
          <match url=".*"/>
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
          </conditions>
          <action type="Rewrite" url="/"/>
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
  <location path="images">
    <system.webServer>
      <staticContent>
        <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00"/>
      </staticContent>
    </system.webServer>
  </location>
  <location path="scripts">
    <system.webServer>
      <staticContent>
        <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00"/>
      </staticContent>
    </system.webServer>
  </location>
  <location path="styles">
    <system.webServer>
      <staticContent>
        <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00"/>
      </staticContent>
    </system.webServer>
  </location>
  <location path="fonts">
    <system.webServer>
      <staticContent>
        <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00"/>
      </staticContent>
    </system.webServer>
  </location>
</configuration>
