-
Notifications
You must be signed in to change notification settings - Fork 274
Expand file tree
/
Copy pathweb.config
More file actions
39 lines (33 loc) · 1.2 KB
/
web.config
File metadata and controls
39 lines (33 loc) · 1.2 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<!-- Enable static content -->
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
<mimeMap fileExtension=".webmanifest" mimeType="application/manifest+json" />
</staticContent>
<!-- Handle SPA routing -->
<rewrite>
<rules>
<rule name="React 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="/BlogApp/Client/index.html" />
</rule>
</rules>
</rewrite>
<!-- Enable compression -->
<urlCompression doStaticCompression="true" doDynamicCompression="true" />
<!-- Enable directory browsing off -->
<directoryBrowse enabled="false" />
<!-- Enable caching -->
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="public, max-age=31536000" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>