-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.config
34 lines (31 loc) · 994 Bytes
/
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
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<!-- Disable IIS custom error handling -->
<httpErrors errorMode="DetailedLocalOnly" existingResponse="PassThrough">
<remove statusCode="403" />
<remove statusCode="404" />
<remove statusCode="405" />
</httpErrors>
<!-- URL Rewrite Rules -->
<rewrite>
<rules>
<!-- Rewrite all requests to index.js -->
<rule name="RewriteToNode" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.js" />
</rule>
</rules>
</rewrite>
<!-- Node.js Handler -->
<handlers>
<add name="iisnode" path="index.js" verb="*" modules="iisnode" />
</handlers>
<!-- Disable Directory Browsing -->
<directoryBrowse enabled="false" />
</system.webServer>
</configuration>