-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathweb.config
More file actions
56 lines (48 loc) · 1.98 KB
/
web.config
File metadata and controls
56 lines (48 loc) · 1.98 KB
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
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<webSocket enabled="true" />
<rewrite>
<rules>
<rule name="Force HTTPS" enabled="true">
<match url="(.*)" ignoreCase="false"/>
<conditions>
<add input="{HTTPS}" pattern="off"/>
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent"/>
</rule>
<!-- React Router rule -->
<rule name="React Router" stopProcessing="true">
<match url="^(?!api|socket.io|file_processing).*$" />
<!-- <match url="^(?!api|socket.io).*$" /> -->
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
<!-- Node.js app reverse proxy rule -->
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="^api/(.*)" />
<action type="Rewrite" url="http://localhost:9001/{R:1}" />
</rule>
<!-- Node.js app reverse proxy rule -->
<rule name="file_processing" stopProcessing="true">
<match url="^file_processing/(.*)" />
<action type="Rewrite" url="http://localhost:5000/{R:1}" />
</rule>
<!-- socket.io app reverse proxy rule -->
<rule name="WebSocketReverseProxy" stopProcessing="true">
<match url="^socket.io/(.*)" />
<action type="Rewrite" url="http://localhost:10000/socket.io/{R:1}" />
</rule>
</rules>
</rewrite>
<!-- For file upload size -->
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security>
</system.webServer>
</configuration>