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 }