examples: bind auth-middleware server to localhost by default (#784)

The auth-middleware example currently defaults to `-http :8080`, which
binds to all interfaces (LAN-exposed) by default.

This changes the default to `localhost:8080` and adds a short comment
noting `-http 0.0.0.0:8080` if you intentionally want to expose it.

Rationale: this example serves token-generation endpoints and
authenticated MCP routes; binding loopback by default avoids accidental
exposure while keeping the opt-in remote behavior.

---------

Co-authored-by: Theodor N. Engøy <theodornengoy@Mac.home>
Co-authored-by: Theodor N. Engøy <theodornengoy@eduroam-193-157-246-146.wlan.uio.no>
This commit is contained in:
Theodor Nesfeldt Engøy 2026-02-11 10:02:17 +01:00 • committed by GitHub
commit 6a81e5da2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,8 +70,8 @@ fi
go build -o "$WORKDIR/conformance-server" ./conformance/everything-server
# Start the server in the background
echo "Starting conformance server on port $PORT..."
"$WORKDIR/conformance-server" -http=":$PORT" &
echo "Starting conformance server on localhost:$PORT..."
"$WORKDIR/conformance-server" -http="localhost:$PORT" &
SERVER_PID=$!
echo "Server pid is $SERVER_PID"