fix: bug: edge-control add_route targets non-existent Caddy server edge — registration succeeds in registry but traffic never routes (#789) #790

Merged
dev-bot merged 2 commits from fix/issue-789 into main 2026-04-15 16:37:20 +00:00
Showing only changes of commit 241ce96046 - Show all commits

View file

@ -225,9 +225,9 @@ EOF
chmod 600 "$GANDI_ENV" chmod 600 "$GANDI_ENV"
# Create Caddyfile with admin API and wildcard cert # Create Caddyfile with admin API and wildcard cert
# The "servers" global option names the auto-generated server "edge" so that # Note: Caddy auto-generates server names (srv0, srv1, …). lib/caddy.sh
# lib/caddy.sh (which discovers the server dynamically) finds a predictable # discovers the server name dynamically via _discover_server_name() so we
# name — defense-in-depth alongside the dynamic discovery in add_route. # don't need to name the server here.
CADDYFILE="/etc/caddy/Caddyfile" CADDYFILE="/etc/caddy/Caddyfile"
cat > "$CADDYFILE" <<'CADDYEOF' cat > "$CADDYFILE" <<'CADDYEOF'
# Caddy configuration for edge control plane # Caddy configuration for edge control plane
@ -235,9 +235,6 @@ cat > "$CADDYFILE" <<'CADDYEOF'
{ {
admin localhost:2019 admin localhost:2019
servers {
name edge
}
} }
# Default site (reverse proxy for edge tunnels will be added dynamically) # Default site (reverse proxy for edge tunnels will be added dynamically)