-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.config
66 lines (66 loc) · 3.27 KB
/
web.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<outboundRules>
<rule name="GZIP Content-Type" preCondition="Has Original" enabled="true">
<match serverVariable="RESPONSE_CONTENT_TYPE" pattern="(.*)" />
<action type="Rewrite" value="{ORIGINAL_CONTENT_TYPE}" />
</rule>
<rule name="GZIP Content-Encoding" preCondition="Has Original">
<match serverVariable="RESPONSE_CONTENT_ENCODING" pattern="(.*)" />
<action type="Rewrite" value="gzip" />
</rule>
<preConditions>
<preCondition name="Has Original">
<add input="{ORIGINAL_CONTENT_TYPE}" pattern="(.+)" />
</preCondition>
</preConditions>
</outboundRules>
<rules>
<clear />
<rule name="GZIP Redirect" stopProcessing="true">
<match url="^(.*)\.gz$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="{R:1}" />
</rule>
<rule name="GZIP - .log">
<match url="^.+\/.+\.log$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<serverVariables>
<set name="ORIGINAL_CONTENT_TYPE" value="text/plain" />
</serverVariables>
<action type="Rewrite" url="{R:0}.gz" appendQueryString="false" logRewrittenUrl="true" />
</rule>
<rule name="GZIP - .html">
<match url="^.+\/.+\.html$" />
<serverVariables>
<set name="ORIGINAL_CONTENT_TYPE" value="text/html" />
</serverVariables>
<action type="Rewrite" url="{R:0}.gz" appendQueryString="false" logRewrittenUrl="true" />
</rule>
<rule name="GZIP - .json">
<match url="^.+\/.+\.json$" />
<serverVariables>
<set name="ORIGINAL_CONTENT_TYPE" value="application/json" />
</serverVariables>
<action type="Rewrite" url="{R:0}.gz" appendQueryString="false" logRewrittenUrl="true" />
</rule>
<rule name="GZIP - .csv">
<match url="^.+\/.+\.csv$" />
<serverVariables>
<set name="ORIGINAL_CONTENT_TYPE" value="application/octet-stream" />
</serverVariables>
<action type="Rewrite" url="{R:0}.gz" appendQueryString="false" logRewrittenUrl="true" />
</rule>
<rule name="GZIP - .png">
<match url="^.+\/.+\.png$" />
<serverVariables>
<set name="ORIGINAL_CONTENT_TYPE" value="image/png" />
</serverVariables>
<action type="Rewrite" url="{R:0}.gz" appendQueryString="false" logRewrittenUrl="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>