fix: remove invalid servers { name edge } Caddyfile directive
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

`name` is not a valid subdirective of the global `servers` block in
Caddyfile syntax — Caddy would reject the config on startup. The
dynamic server discovery in `_discover_server_name()` already handles
routing to the correct server regardless of its auto-generated name.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude 2026-04-15 16:31:09 +00:00
parent 987413ab3a
commit 241ce96046

View file

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