-
Notifications
You must be signed in to change notification settings - Fork 8
/
web.config
71 lines (68 loc) · 2.7 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
<?xml version="1.0" encoding="utf-8"?>
<!--
This configuration file is required if iisnode is used to run node processes behind
IIS or IIS Express. For more information, visit:
https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config
-->
<configuration>
<system.webServer>
<!-- 'bin' directory has no special meaning in node.js and apps can be placed in it -->
<security>
<requestFiltering>
<hiddenSegments>
<remove segment="bin" />
<add segment="node_modules" />
<add segment="src" />
<add segment="webpack" />
<add segment="views" />
<add segment="tests" />
<add segment="styles" />
<add segment="storage" />
<add segment="config" />
<add segment="iisnode" />
<add segment="lib" />
</hiddenSegments>
</requestFiltering>
</security>
<!-- Make sure error responses are left untouched -->
<httpErrors existingResponse="PassThrough" />
<modules>
<remove name="WebDAVModule" />
<add name="iisnode" />
</modules>
<handlers>
<add name="iisnode" path="iisnode.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<!-- HTTP to HTTPS redirect -->
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
<!-- Don't interfere with requests for logs -->
<rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^[a-zA-Z0-9_\-]+\.js\.logs\/\d+\.txt$" />
</rule>
<!-- Don't interfere with requests for node-inspector debugging -->
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^server.js\/debug[\/]?" />
</rule>
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True" />
</conditions>
<action type="Rewrite" url="iisnode.js" />
</rule>
</rules>
</rewrite>
<iisnode enableXFF="true" devErrorsEnabled="false" debuggingEnabled="false" loggingEnabled="true" nodeProcessCommandLine="C:\\Program Files\\nodejs\\node.exe" node_env="production" />
<directoryBrowse enabled="false" />
</system.webServer>
<appSettings>
<add key="DEBUG" value="dev" />
</appSettings>
</configuration>