-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathCaddyfile.dev
More file actions
63 lines (57 loc) · 1.34 KB
/
Caddyfile.dev
File metadata and controls
63 lines (57 loc) · 1.34 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
{
debug
}
http://localhost {
# Compress everything except the SSE stream — gzip buffers and would stall
# an open text/event-stream connection.
@compressible not path /api/v1/events /v1/events
encode @compressible gzip
# SSE live events (/v1/events, reached as /api/v1/events behind this proxy).
@sse path /api/v1/events /v1/events
# ---- Maintenance mode ----
# Toggle with `scripts/maintenance.sh on|off`, or create/delete the flag
# file ./public/maintenance/ON directly. The `file` matcher is checked
# per-request, so toggling needs no reload.
@maintenance file {
root /srv/maintenance
try_files ON
}
route {
handle @maintenance {
root * /srv/maintenance
rewrite * /index.html
header Retry-After "3600"
header Cache-Control "no-store"
file_server {
status 503
}
}
# Tile API (land-cover / canopy / buildings)
handle_path /api/tiles/* {
rewrite * /tiles{uri}
reverse_proxy meshinfo:9000
}
handle /tiles/* {
reverse_proxy meshinfo:9000
}
# SSE live events (unbuffered; must precede /api/*).
handle @sse {
uri strip_prefix /api
reverse_proxy meshinfo:9000 {
flush_interval -1
}
}
handle_path /api/* {
reverse_proxy meshinfo:9000
}
handle /next {
respond "Gone" 410
}
handle /next/* {
respond "Gone" 410
}
handle {
reverse_proxy frontend:5173
}
}
}