generated from juanjiTech/jframe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Caddyfile
52 lines (45 loc) · 1.06 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
:80 {
log {
output file /tmp/caddy.log
level DEBUG
format console
}
root * /Serve/frontend
file_server
encode gzip
handle /api/* {
reverse_proxy 127.0.0.1:27811 {
header_up Host {http.request.host}
header_up X-Real-IP {http.request.remote}
header_up X-Forwarded-For {http.request.remote}
header_up X-Forwarded-Port {http.request.port}
header_up X-Forwarded-Proto {http.request.scheme}
}
}
handle /gapi/* {
reverse_proxy 127.0.0.1:27811 {
header_up Host {http.request.host}
header_up X-Real-IP {http.request.remote}
header_up X-Forwarded-For {http.request.remote}
header_up X-Forwarded-Port {http.request.port}
header_up X-Forwarded-Proto {http.request.scheme}
}
}
handle {
try_files {path} /index.html
}
}
:443 {
root * /Serve/frontend
file_server
encode gzip
handle /api/* {
reverse_proxy 127.0.0.1:27811
}
handle /gapi/* {
reverse_proxy 127.0.0.1:27811
}
handle {
try_files {path} /index.html
}
}