File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 3030 <action type =" Rewrite" url =" /angular-demos/" />
3131 </rule >
3232 </rules >
33+ <outboundRules >
34+ <rule name =" Cache immutable files" preCondition =" IsImmutable" >
35+ <match serverVariable =" RESPONSE_Cache-Control" pattern =" .*" />
36+ <action type =" Rewrite" value =" public, max-age=31536000, immutable" />
37+ </rule >
38+ <preConditions >
39+ <preCondition name =" IsImmutable" logicalGrouping =" MatchAny" >
40+ <add input =" {REQUEST_URI}" pattern =" styles-.*\.css$" />
41+ <add input =" {REQUEST_URI}" pattern =" chunk-.*\.js$" />
42+ <add input =" {REQUEST_URI}" pattern =" main-.*\.js$" />
43+ <add input =" {REQUEST_URI}" pattern =" polyfills-.*\.js$" />
44+ <add input =" {REQUEST_URI}" pattern =" /media/.*" />
45+ </preCondition >
46+ </preConditions >
47+ </outboundRules >
3348 </rewrite >
3449 <staticContent >
35- <clientCache cacheControlMode =" UseMaxAge" cacheControlMaxAge =" 365.00:00:00" />
50+ <!-- 1 hour public cache for regular static assets -->
51+ <clientCache cacheControlMode =" UseMaxAge" cacheControlMaxAge =" 0.01:00:00" cacheControlCustom =" public" />
52+
3653 <remove fileExtension =" .json" />
3754 <remove fileExtension =" .csv" />
3855 <remove fileExtension =" .shp" />
5370 </customHeaders >
5471 </httpProtocol >
5572</system .webServer>
73+ <location path =" index.html" >
74+ <system .webServer>
75+ <staticContent >
76+ <!-- Short-lived cache for index.html -->
77+ <clientCache cacheControlMode =" UseMaxAge" cacheControlMaxAge =" 0.00:05:00" cacheControlCustom =" public" />
78+ </staticContent >
79+ </system .webServer>
80+ </location >
5681</configuration >
Original file line number Diff line number Diff line change 5353 <staticContent >
5454 <!-- 1 hour public cache for regular static assets -->
5555 <clientCache cacheControlMode =" UseMaxAge" cacheControlMaxAge =" 0.01:00:00" cacheControlCustom =" public" />
56+
5657 <remove fileExtension =" .json" />
5758 <remove fileExtension =" .csv" />
5859 <remove fileExtension =" .shp" />
You can’t perform that action at this time.
0 commit comments