Skip to content

Commit

Permalink
Merge pull request #45 from podlove/fix/caddy-env
Browse files Browse the repository at this point in the history
fix(env) - Caddy server fix api-Route handling
  • Loading branch information
alexander-heimbuch authored Aug 18, 2024
2 parents e129657 + 269ec94 commit 4eea4a9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
13 changes: 9 additions & 4 deletions devbox.d/caddy/Caddyfile
Original file line number Diff line number Diff line change
@@ -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
}
}
8 changes: 5 additions & 3 deletions e2e/environment/Caddyfile
Original file line number Diff line number Diff line change
@@ -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
}
Expand Down

0 comments on commit 4eea4a9

Please sign in to comment.