Skip to content

Commit 545fda2

Browse files
Fix Caddy routing so control health is proxied again
The catch-all file_server handle matched /service/control/health and returned 404, so wait-on never saw the control service. Put proxy routes in their own mutually exclusive handles. Co-authored-by: Max Schmitt <max@schmitt.mx>
1 parent eb5ecb1 commit 545fda2

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

‎frontend/Caddyfile‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,25 @@
22

33
root * /frontend
44

5+
# Path-specific handles are mutually exclusive. A catch-all file_server
6+
# handle would 404 /service/control/* before reverse_proxy could run.
57
handle /runtime-config.js {
68
header Content-Type text/javascript
79
header Cache-Control no-store
810
respond "window.__TRY_PLAYWRIGHT__={skipTurnstile:{$SKIP_TURNSTILE:false}};"
911
}
1012

13+
handle /service/control/* {
14+
reverse_proxy control:8080
15+
}
16+
17+
handle /file-uploads/* {
18+
reverse_proxy rustfs:9000 {
19+
header_up Host rustfs:9000
20+
method GET
21+
}
22+
}
23+
1124
handle {
1225
file_server
1326
}
@@ -17,9 +30,3 @@ header *.css Cache-Control max-age=86400
1730
header *.tff Cache-Control max-age=86400
1831

1932
log
20-
21-
reverse_proxy /service/control/* control:8080
22-
reverse_proxy /file-uploads/* rustfs:9000 {
23-
header_up Host rustfs:9000
24-
method GET
25-
}

0 commit comments

Comments
 (0)