From 269ec941f104313cd59dee098ab6c855a8316633 Mon Sep 17 00:00:00 2001 From: Dirk Schumann Date: Sat, 17 Aug 2024 13:12:55 +0200 Subject: [PATCH] fix(env) - Caddy server fix api-Route handling --- devbox.d/caddy/Caddyfile | 13 +++++++++---- e2e/environment/Caddyfile | 8 +++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/devbox.d/caddy/Caddyfile b/devbox.d/caddy/Caddyfile index 48c1d01..3443571 100644 --- a/devbox.d/caddy/Caddyfile +++ b/devbox.d/caddy/Caddyfile @@ -1,6 +1,11 @@ publisher.podlove.dev { - root * {$DEVBOX_PROJECT_ROOT}/dist/ - reverse_proxy /api/* localhost:4005 - file_server - try_files {path} {path}/ /index.html + handle /api/* { + reverse_proxy localhost:4005 + } + + handle { + root * {$DEVBOX_PROJECT_ROOT}/dist/ + try_files {path} {path}/ /index.html + file_server + } } diff --git a/e2e/environment/Caddyfile b/e2e/environment/Caddyfile index 1433823..3943952 100644 --- a/e2e/environment/Caddyfile +++ b/e2e/environment/Caddyfile @@ -1,8 +1,10 @@ http://localhost { - root * /app/ + handle /api/* { + reverse_proxy backend:4000 + } - route { - reverse_proxy /api/* backend:4000 + handle { + root * /app/ try_files {path} {path}/ /index.html file_server }