-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCaddyfile
69 lines (66 loc) · 1.32 KB
/
Caddyfile
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
:82 {
redir https://swust.devin.cool permanent
log
}
swust.devin.cool {
reverse_proxy /api/v2/extension/cr {
to 172.17.0.1:8000
}
handle_path /api/hitokoto {
reverse_proxy {
header_up -Referer
header_up -Host
header_up +Host "8.137.92.6:8000"
to hitokoto_api:8000 8.137.92.6:8000
lb_policy random
}
}
reverse_proxy /api/v2/login/* {
to backend:8080 10.13.13.2:8080
lb_policy first
health_uri /api/v2/test/ping
health_interval 10s
health_timeout 2s
health_status 2xx
}
reverse_proxy /api/* {
to backend:8080 10.13.13.2:8080
lb_policy random
health_uri /api/v2/test/ping
health_interval 10s
health_timeout 2s
health_status 2xx
}
handle_path /plugins/* {
handle_path /djs/* {
rewrite * /djs/{path}
reverse_proxy 172.17.0.1:50002
}
handle_path /dfy* {
rewrite * /
reverse_proxy 172.17.0.1:50002
}
handle_path /homework* {
rewrite * /plugins/homework
reverse_proxy 172.17.0.1:50001
}
root * /swust/plugins
}
@static {
path_regexp \.(ico|css|js|gif|jpg|jpeg|png|svg|woff)$
}
header ?Cache-Control "stale-if-error=31536000"
header @static Cache-Control "max-age=0,stale-while-revalidate=31536000"
root * /swust
file_server
encode {
gzip 9
}
log
}
:50002 {
root * /mht/dist
reverse_proxy /homework* 172.17.0.1:50001
file_server
log
}