Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions browser/web.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
<dynamicTypes>
<add enabled="true" mimeType="text/*"/>
<add enabled="true" mimeType="message/*"/>
<add enabled="true" mimeType="application/javascript"/>
<add enabled="true" mimeType="application/json"/>
<add enabled="false" mimeType="*/*"/>
</dynamicTypes>
<staticTypes>
<add enabled="true" mimeType="text/*"/>
<add enabled="true" mimeType="message/*"/>
<add enabled="true" mimeType="application/javascript"/>
<add enabled="true" mimeType="application/json"/>
<add enabled="true" mimeType="image/svg+xml"/>
<add enabled="false" mimeType="*/*"/>
</staticTypes>
</httpCompression>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
Expand All @@ -16,8 +34,26 @@
<action type="Redirect" url="/products/ignite-ui-angular/getting-started" redirectType="Permanent" />
</rule>
</rules>
<outboundRules>
<rule name="Cache immutable files" preCondition="IsImmutable">
<match serverVariable="RESPONSE_Cache-Control" pattern=".*" />
<action type="Rewrite" value="public, max-age=31536000, immutable" />
</rule>
<preConditions>
<preCondition name="IsImmutable" logicalGrouping="MatchAny">
<add input="{REQUEST_URI}" pattern="styles-.*\.css$" />
<add input="{REQUEST_URI}" pattern="chunk-.*\.js$" />
<add input="{REQUEST_URI}" pattern="main-.*\.js$" />
<add input="{REQUEST_URI}" pattern="polyfills-.*\.js$" />
<add input="{REQUEST_URI}" pattern="/media/.*" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
<staticContent>
<!-- 1 hour public cache for regular static assets -->
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="0.01:00:00" cacheControlCustom="public" />

<remove fileExtension=".json" />
<remove fileExtension=".csv" />
<remove fileExtension=".shp" />
Expand All @@ -38,4 +74,12 @@
</customHeaders>
</httpProtocol>
</system.webServer>
<location path="index.html">
<system.webServer>
<staticContent>
<!-- Short-lived cache for index.html -->
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="0.00:05:00" cacheControlCustom="public" />
</staticContent>
</system.webServer>
</location>
</configuration>