-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathweb.config
55 lines (55 loc) · 2.12 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
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
<system.webServer>
<handlers>
<clear />
<add name="iisnode" path="/index.js" verb="*" modules="iisnode" />
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
</handlers>
<rewrite>
<rules>
<rule name="http-to-https" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTPS}" pattern="off" />
<add input="{HTTP_HOST}" pattern="localhost" negate="true"/>
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>
<rule name="node" stopProcessing="true">
<conditions logicalGrouping="MatchAny">
<add input="{REQUEST_URI}" pattern="^/api/" />
</conditions>
<action type="Rewrite" url="/index.js" />
</rule>
<rule name="node_modules" stopProcessing="true">
<conditions logicalGrouping="MatchAny">
<add input="{REQUEST_URI}" pattern="^/node_modules/" />
</conditions>
</rule>
<rule name="client">
<action type="Rewrite" url="client{REQUEST_URI}" />
</rule>
<rule name="file" stopProcessing="true">
<conditions logicalGrouping="MatchAny">
<add input="{REQUEST_FILENAME}" matchType="IsFile" />
<add input="{REQUEST_URI}" pattern="^/client/(?:app|node_modules|css|less|img|data)/" />
</conditions>
</rule>
<rule name="app" stopProcessing="true">
<action type="Rewrite" url="client/index.html" />
</rule>
</rules>
</rewrite>
<httpErrors errorMode="Detailed" existingResponse="PassThrough" />
<security>
<requestFiltering>
<requestLimits maxQueryString="8192" />
</requestFiltering>
</security>
<iisnode watchedFiles="*.js;lib\*.js;lib\calling\*.js"/>
</system.webServer>
</configuration>