-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdefault.conf
56 lines (50 loc) · 1.31 KB
/
default.conf
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
map $http_upgrade $connection_upgrade {
default keep-alive;
'websocket' upgrade;
}
server {
listen 8090;
client_max_body_size 1000M;
error_page 404 /;
location /hub {
set $hostx "";
set $addrs "";
if ( $http_referer ~ "^https?./+([^/]+)/(.+)$") {
set $hostx $1;
set $addrs $2;
}
proxy_pass http://localhost:8000;
proxy_set_header Referer http://localhost:8000/$addrs;
proxy_set_header Host localhost:8000;
proxy_set_header Origin http://localhost:8000;
}
location /user {
proxy_pass http://localhost:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host localhost:8000;
proxy_set_header Origin http://localhost:8000;
}
location ^~ /submit {
proxy_pass http://localhost:8080;
}
location ^~ /v1 {
proxy_pass http://localhost:8080;
}
location ^~ /v2 {
proxy_pass http://localhost:8080;
}
location ~ /(\d+\.)+\d+/(.*)$ {
rewrite /(\d+\.)+\d+/(.*)$ /$2 break;
proxy_pass http://localhost:8090;
}
location ~ /(\d+)/(.*)$ {
rewrite /(\d+)/(.*)$ /$2 break;
proxy_pass http://localhost:8090;
}
location / {
alias /application/web/;
index index.html;
}
}