Skip to content

Commit db51161

Browse files
authored
fix: have caddy apply url prefix to relative redirects from services (#150)
Co-authored-by: Kyle Kienapfel <[email protected]>
1 parent d8d9721 commit db51161

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Caddyfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
{$HOSTNAME} {
22
route /api* {
33
uri strip_prefix /api
4-
reverse_proxy http://api:14702
4+
reverse_proxy http://api:14702 {
5+
header_down Location "^/" "/api/"
6+
}
57
}
68

79
route /ws {
810
uri strip_prefix /ws
9-
reverse_proxy http://events:14703
11+
reverse_proxy http://events:14703 {
12+
header_down Location "^/" "/ws/"
13+
}
1014
}
1115

1216
route /autumn* {
1317
uri strip_prefix /autumn
14-
reverse_proxy http://autumn:14704
18+
reverse_proxy http://autumn:14704 {
19+
header_down Location "^/" "/autumn/"
20+
}
1521
}
1622

1723
route /january* {
1824
uri strip_prefix /january
19-
reverse_proxy http://january:14705
25+
reverse_proxy http://january:14705 {
26+
header_down Location "^/" "/january/"
27+
}
2028
}
2129

2230
reverse_proxy http://web:5000

0 commit comments

Comments
 (0)