-
-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathCaddyfile
More file actions
82 lines (65 loc) · 1.41 KB
/
Copy pathCaddyfile
File metadata and controls
82 lines (65 loc) · 1.41 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
:80
log
handle_path /oops* {
root * /lila/public/oops
file_server
}
# for http://localhost:8080/oops/font.html
handle_path /font* {
root * /lila/public/font
file_server
}
# for http://localhost:8080/oops/flair.html
handle_path /flair/list.txt {
root * /lila/public/flair/list.txt
file_server
}
handle_path /static* {
root * /static
file_server
}
handle_path /display* {
rewrite * /display
reverse_proxy picfit:3001
}
handle_path /explorer* {
reverse_proxy openingexplorer:9002
}
handle_path /embed/* {
rewrite * /embed{uri}
reverse_proxy lila:9663 {
header_up Host {$LILA_DOMAIN}
header_up Origin {$LILA_URL}
header_down Cross-Origin-Embedder-Policy "credentialless"
}
}
@websockets {
header Connection *Upgrade*
header Upgrade websocket
}
reverse_proxy @websockets lila_ws:9664 {
header_up Origin {$LILA_URL}
}
reverse_proxy lila:9663 {
header_up Host {$LILA_DOMAIN}
header_up Origin {$LILA_URL}
# header_up X-Lichess-School true
# allow CORS for requests from web client on lichess.org/api
header_down Access-Control-Allow-Origin "*"
header_down Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"
}
handle_errors {
@502 expression {http.error.status_code} == 502
route @502 {
route /display* {
root * /static/errors
rewrite * /picfit-placeholder.png
file_server
}
route {
root * /static/errors
rewrite * /502.html
file_server
}
}
}