-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathweb.config
42 lines (40 loc) · 1.34 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
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="app.js" verb="*" modules="iisnode"/>
</handlers>
<rewrite>
<rules>
<rule name="StaticContentApp" stopProcessing="true">
<match url="^app/.*$" />
<conditions>
<add input="{REQUEST_URI}" matchType="IsFile"/>
</conditions>
<action type="Rewrite" url="{REQUEST_URI}"/>
</rule>
<rule name="StaticContentNodeModules" stopProcessing="true">
<match url="^node_modules/.*$" />
<conditions>
<add input="{REQUEST_URI}" matchType="IsFile"/>
</conditions>
<action type="Rewrite" url="{REQUEST_URI}"/>
</rule>
<rule name="DynamicContent">
<action type="Rewrite" url="app.js"/>
</rule>
</rules>
</rewrite>
<!-- 'bin' directory has no special meaning in node.js and apps can be placed in it -->
<security>
<requestFiltering>
<hiddenSegments>
<remove segment="bin"/>
</hiddenSegments>
</requestFiltering>
</security>
<!-- Make sure error responses are left untouched -->
<httpErrors existingResponse="PassThrough" />
<iisnode watchedFiles="web.config;*.js" node_env="production"/>
</system.webServer>
</configuration>