-
Notifications
You must be signed in to change notification settings - Fork 3
/
web.config
109 lines (104 loc) · 4.71 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<httpRuntime requestPathInvalidCharacters="" maxUrlLength="8192"/>
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
<remove name="Server" />
<remove name="apicache-store" />
<remove name="apicache-version" />
<remove name="x-github-request-id" />
<remove name="x-fastly-request-id" />
<remove name="x-served-by" />
<add name="Arr-Disable-Session-Affinity" value="true" />
</customHeaders>
</httpProtocol>
<webSocket enabled="false" />
<security>
<requestFiltering removeServerHeader ="true" >
<fileExtensions allowUnlisted="true" >
<add fileExtension=".php" allowed="false"/>
<add fileExtension=".map" allowed="false"/>
</fileExtensions>
<hiddenSegments>
<add segment="node_modules" />
<remove segment="bin" />
</hiddenSegments>
</requestFiltering>
</security>
<handlers>
<add name="iisnode" path="run.cjs" verb="*" modules="iisnode"/>
</handlers>
<rewrite>
<rules>
<rule name="WarmupSplashPage" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{APP_WARMING_UP}" pattern="1" />
<add input="{WARMUP_REQUEST}" pattern="1" negate="true" />
<add input="{REMOTE_ADDR}" pattern="^100?\." negate="true" />
<add input="{HTTP_USER_AGENT}" pattern="Initialization" negate="true" />
<add input="{HTTP_USER_AGENT}" pattern="SiteWarmup" negate="true" />
<add input="{HTTP_USER_AGENT}" pattern="AlwaysOn" negate="true" />
</conditions>
<action type="CustomResponse" statusCode="503" statusReason="Down for maintenance" statusDescription="We will be back up soon" />
</rule>
<!-- Redirect to HTTPS Version Always -->
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
<add input="{WARMUP_REQUEST}" pattern="1" negate="true" />
<add input="{REMOTE_ADDR}" pattern="^100?\." negate="true" />
<add input="{HTTP_USER_AGENT}" pattern="Initialization" negate="true" />
<add input="{HTTP_USER_AGENT}" pattern="SiteWarmup" negate="true" />
<add input="{HTTP_USER_AGENT}" pattern="AlwaysOn" negate="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
</rule>
<!-- All other URLs are mapped to the node.js web app entry point -->
<rule name="DynamicContent">
<action type="Rewrite" url="run.cjs"/>
</rule>
</rules>
<outboundRules>
<rule name="WarmupSplashPageCacheControl">
<match serverVariable="RESPONSE_Cache_Control" pattern="(.*)" negate="false" />
<conditions>
<add input="{APP_WARMING_UP}" pattern="1" />
<add input="{HTTP_USER_AGENT}" pattern="Initialization" negate="true" />
<add input="{HTTP_USER_AGENT}" pattern="SiteWarmup" negate="true" />
<add input="{HTTP_USER_AGENT}" pattern="AlwaysOn" negate="true" />
</conditions>
<action type="Rewrite" value="no-store, no-cache, must-revalidate" />
</rule>
<rule name="WarmupSplashPagePragma">
<match serverVariable="RESPONSE_Pragma" pattern="(.*)" negate="false" />
<conditions>
<add input="{APP_WARMING_UP}" pattern="1" />
<add input="{HTTP_USER_AGENT}" pattern="Initialization" negate="true" />
<add input="{HTTP_USER_AGENT}" pattern="SiteWarmup" negate="true" />
<add input="{HTTP_USER_AGENT}" pattern="AlwaysOn" negate="true" />
</conditions>
<action type="Rewrite" value="no-cache" />
</rule>
<rule name="WarmupSplashPageExpires">
<match serverVariable="RESPONSE_Expires" pattern="(.*)" negate="false" />
<conditions>
<add input="{APP_WARMING_UP}" pattern="1" />
<add input="{HTTP_USER_AGENT}" pattern="Initialization" negate="true" />
<add input="{HTTP_USER_AGENT}" pattern="SiteWarmup" negate="true" />
<add input="{HTTP_USER_AGENT}" pattern="AlwaysOn" negate="true" />
</conditions>
<action type="Rewrite" value="Tue, 01 Jan 1980 1:00:00 GMT" />
</rule>
</outboundRules>
</rewrite>
<applicationInitialization doAppInitAfterRestart="true">
<add initializationPage="/" />
</applicationInitialization>
</system.webServer>
</configuration>