1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <configuration >
3
+ <system .webServer>
4
+ <staticContent >
5
+ <remove fileExtension =" .dll" />
6
+ <remove fileExtension =" .json" />
7
+ <remove fileExtension =" .woff" />
8
+ <remove fileExtension =" .woff2" />
9
+ <remove fileExtension =" .dat" />
10
+ <remove fileExtension =" .wasm" />
11
+ <remove fileExtension =" .blat" />
12
+ <remove fileExtension =" .webmanifest" />
13
+ <mimeMap fileExtension =" .json" mimeType =" application/json" />
14
+ <mimeMap fileExtension =" .woff" mimeType =" font/woff" />
15
+ <mimeMap fileExtension =" .woff2" mimeType =" font/woff2" />
16
+ <mimeMap fileExtension =" .dat" mimeType =" application/octet-stream" />
17
+ <mimeMap fileExtension =" .dll" mimeType =" application/octet-stream" />
18
+ <mimeMap fileExtension =" .wasm" mimeType =" application/wasm" />
19
+ <mimeMap fileExtension =" .blat" mimeType =" application/octet-stream" />
20
+ <mimeMap fileExtension =" .webmanifest" mimeType =" application/manifest+json" />
21
+ <mimeMap fileExtension =" .js.gz" mimeType =" application/javascript" />
22
+ <mimeMap fileExtension =" .dat.gz" mimeType =" application/octet-stream" />
23
+ <mimeMap fileExtension =" .dll.gz" mimeType =" application/octet-stream" />
24
+ <mimeMap fileExtension =" .json.gz" mimeType =" application/json" />
25
+ <mimeMap fileExtension =" .wasm.gz" mimeType =" application/wasm" />
26
+ <mimeMap fileExtension =" .blat.gz" mimeType =" application/octet-stream" />
27
+ <mimeMap fileExtension =" .webmanifest.gz" mimeType =" application/manifest+json" />
28
+ <mimeMap fileExtension =" .html.gz" mimeType =" text/html" />
29
+ <mimeMap fileExtension =" .css.gz" mimeType =" text/css" />
30
+ <mimeMap fileExtension =" .ico.gz" mimeType =" image/x-icon" />
31
+ <mimeMap fileExtension =" .svg.gz" mimeType =" image/svg+xml" />
32
+ <mimeMap fileExtension =" .js.br" mimeType =" application/javascript" />
33
+ <mimeMap fileExtension =" .dat.br" mimeType =" application/octet-stream" />
34
+ <mimeMap fileExtension =" .dll.br" mimeType =" application/octet-stream" />
35
+ <mimeMap fileExtension =" .json.br" mimeType =" application/json" />
36
+ <mimeMap fileExtension =" .wasm.br" mimeType =" application/wasm" />
37
+ <mimeMap fileExtension =" .blat.br" mimeType =" application/octet-stream" />
38
+ <mimeMap fileExtension =" .webmanifest.br" mimeType =" application/manifest+json" />
39
+ <mimeMap fileExtension =" .html.br" mimeType =" text/html" />
40
+ <mimeMap fileExtension =" .css.br" mimeType =" text/css" />
41
+ <mimeMap fileExtension =" .ico.br" mimeType =" image/x-icon" />
42
+ <mimeMap fileExtension =" .svg.br" mimeType =" image/svg+xml" />
43
+ </staticContent >
44
+ <httpCompression >
45
+ <dynamicTypes >
46
+ <remove mimeType =" text/*" />
47
+ <remove mimeType =" application/javascript" />
48
+ <remove mimeType =" image/svg+xml" />
49
+ </dynamicTypes >
50
+ <staticTypes >
51
+ <remove mimeType =" text/*" />
52
+ <remove mimeType =" application/javascript" />
53
+ <remove mimeType =" image/svg+xml" />
54
+ </staticTypes >
55
+ </httpCompression >
56
+ <rewrite >
57
+ <outboundRules rewriteBeforeCache =" true" >
58
+ <rule name =" Add Vary Accept-Encoding" preCondition =" PreCompressedFile" enabled =" true" >
59
+ <match serverVariable =" RESPONSE_Vary" pattern =" .*" />
60
+ <action type =" Rewrite" value =" Accept-Encoding" />
61
+ </rule >
62
+ <rule name =" Add Encoding Brotli" preCondition =" PreCompressedBrotli" enabled =" true" stopProcessing =" true" >
63
+ <match serverVariable =" RESPONSE_Content_Encoding" pattern =" .*" />
64
+ <action type =" Rewrite" value =" br" />
65
+ </rule >
66
+ <rule name =" Add Encoding Gzip" preCondition =" PreCompressedGzip" enabled =" true" stopProcessing =" true" >
67
+ <match serverVariable =" RESPONSE_Content_Encoding" pattern =" .*" />
68
+ <action type =" Rewrite" value =" gzip" />
69
+ </rule >
70
+ <preConditions >
71
+ <preCondition name =" PreCompressedFile" >
72
+ <add input =" {HTTP_URL}" pattern =" \.(gz|br)$" />
73
+ </preCondition >
74
+ <preCondition name =" PreCompressedBrotli" >
75
+ <add input =" {HTTP_URL}" pattern =" \.br$" />
76
+ </preCondition >
77
+ <preCondition name =" PreCompressedGzip" >
78
+ <add input =" {HTTP_URL}" pattern =" \.gz$" />
79
+ </preCondition >
80
+ </preConditions >
81
+ </outboundRules >
82
+ <rules >
83
+ <rule name =" Serve subdir" >
84
+ <match url =" .*" />
85
+ <action type =" Rewrite" url =" wwwroot\{R:0}" />
86
+ </rule >
87
+ <rule name =" Rewrite brotli file" stopProcessing =" true" >
88
+ <match url =" (.*)" />
89
+ <conditions >
90
+ <add input =" {HTTP_ACCEPT_ENCODING}" pattern =" br" />
91
+ <add input =" {REQUEST_FILENAME}" pattern =" \.(js|dat|dll|json|wasm|blat|webmanifest|htm|html|css|ico|svg)$" />
92
+ <add input =" {REQUEST_FILENAME}.br" matchType =" IsFile" />
93
+ </conditions >
94
+ <action type =" Rewrite" url =" {R:1}.br" />
95
+ </rule >
96
+ <rule name =" Rewrite gzip file" stopProcessing =" true" >
97
+ <match url =" (.*)" />
98
+ <conditions >
99
+ <add input =" {HTTP_ACCEPT_ENCODING}" pattern =" gzip" />
100
+ <add input =" {REQUEST_FILENAME}" pattern =" \.(js|dat|dll|json|wasm|blat|webmanifest|htm|html|css|ico|svg)$" />
101
+ <add input =" {REQUEST_FILENAME}.gz" matchType =" IsFile" />
102
+ </conditions >
103
+ <action type =" Rewrite" url =" {R:1}.gz" />
104
+ </rule >
105
+ <rule name =" SPA fallback routing" stopProcessing =" true" >
106
+ <match url =" .*" />
107
+ <conditions logicalGrouping =" MatchAll" >
108
+ <add input =" {REQUEST_FILENAME}" matchType =" IsFile" negate =" true" />
109
+ </conditions >
110
+ <action type =" Rewrite" url =" wwwroot\" />
111
+ </rule >
112
+ </rules >
113
+ </rewrite >
114
+ </system .webServer>
115
+ </configuration >
0 commit comments