| M | test/ | 6 | ++++-- |
@@ -363,7 +363,9 @@ private_server() {
363363 # domain), on a free port in the background, in front of a private server364364 # it starts. Sets C, its URL. Without caddy installed the scenario stops365365 # here, passing, and says so. As with private_server, another scenario can366-# take the port first; then this Caddy exits, and it tries another.366+# take the port first; then this Caddy exits, and it tries another. It367+# binds 127.0.0.1 only: bound to every address, the port is still free for368+# another scenario's server to take on 127.0.0.1, and with it the requests.367369 caddy_server() {368370 command -v caddy >/dev/null 2>&1 || { note "caddy is not installed: skipped running it"; exit 0; }369371 private_server@@ -371,7 +373,7 @@ caddy_server() {
371373 while :; do372374 cport=$(free_port)373375 {374- printf '{\n\tadmin off\n\tauto_https off\n\tpersist_config off\n}\n\n'376+ printf '{\n\tadmin off\n\tauto_https off\n\tpersist_config off\n\tdefault_bind 127.0.0.1\n}\n\n'375377 FORGE_PRIVATE_PORT=$PRIV_PORT "$FORGE" server caddyfile "http://127.0.0.1:$cport"376378 } >"$T/Caddyfile.run"377379 XDG_DATA_HOME=$T/xdg XDG_CONFIG_HOME=$T/xdg caddy run --config "$T/Caddyfile.run" --adapter caddyfile >"$T/caddy.log" 2>&1 &