From c0e5bddb039c7a40609f6092470bf3d0c81a148f Mon Sep 17 00:00:00 2001 From: Kyle Kienapfel Date: Mon, 12 May 2025 22:49:48 -0700 Subject: [PATCH] fix: add url prefix back on when provided a redirect location starting with / Definitely required for autumn, as /autumn/attachments/:id: will redirect to /attachments/:id:/:filename: But we want the browser to redirect to /autumn/attachments/:id:/:filename: Speculatively added for the other services --- Caddyfile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Caddyfile b/Caddyfile index 64753cf..be9c385 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,22 +1,30 @@ {$HOSTNAME} { route /api* { uri strip_prefix /api - reverse_proxy http://api:14702 + reverse_proxy http://api:14702 { + header_down Location "^/" "/api/" + } } route /ws { uri strip_prefix /ws - reverse_proxy http://events:14703 + reverse_proxy http://events:14703 { + header_down Location "^/" "/ws/" + } } route /autumn* { uri strip_prefix /autumn - reverse_proxy http://autumn:14704 + reverse_proxy http://autumn:14704 { + header_down Location "^/" "/autumn/" + } } route /january* { uri strip_prefix /january - reverse_proxy http://january:14705 + reverse_proxy http://january:14705 { + header_down Location "^/" "/january/" + } } reverse_proxy http://web:5000