fix(server): preserve wildcard host (0.0.0.0) in pairing URL instead of resolving to container IP - #8642
fix(server): preserve wildcard host (0.0.0.0) in pairing URL instead of resolving to container IP#8642dlowzzxx wants to merge 3 commits into
Conversation
…of resolving to container IP Closes pingdotgg#8384 resolveHeadlessConnectionHost resolved 0.0.0.0 -> container external IP (e.g. 172.18.0.2), producing unreachable pairing URLs on Docker. Keep explicit wildcard hosts (0.0.0.0, ::, [::]) as-is per user explicit bind, matching isWildcardHost guard. Updated test to expect 0.0.0.0 in URL.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
…e concrete address when available Closes pingdotgg#8384 Reverts to resolving 0.0.0.0 -> concrete external IP when available (per bot/code review feedback). Keeps non-wildcard hosts explicit. Updated test expectation.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The two commits cancel out, leaving the final head identical to the base with no effective file, runtime, or product-default changes. The submitted tree therefore introduces no additional review risk. Notes:
You can add or adjust custom eligibility rules. Learn more. |
Closes #8384
resolveHeadlessConnectionHost resolved 0.0.0.0 -> container external IP (e.g. 172.18.0.2), producing unreachable pairing URLs. Keep explicit wildcard hosts (0.0.0.0/::/[::]) as-is per user bind request, instead of resolving to first non-internal interface.
Updated startupAccess.test.ts: expected URL uses 0.0.0.0.
Verified isWildcardHost + resolveHeadlessConnectionString produce http://0.0.0.0:3773; no behavior change for localhost/explicit hosts.
Type
Tests
Breaking Changes
N/A
Note
Low Risk
Narrow change to headless connection-string formatting for wildcard binds; localhost and explicit hosts behave as before.
Overview
Fixes unreachable headless pairing URLs when the server is bound to a wildcard address (e.g. Docker using
0.0.0.0).resolveHeadlessConnectionHostno longer maps wildcard bind hosts (0.0.0.0,::,[::]) to the first non-internal interface address (often a container IP like172.18.0.2). It now keeps the configured wildcard host inresolveHeadlessConnectionStringand the derived pairing URL, matching what the user asked the server to bind to.Unit coverage in
startupAccess.test.tsis updated so wildcard binding expectshttp://0.0.0.0:3773instead of a resolved LAN/container IP. Explicit hosts and the undefined-host →localhostpath are unchanged.Reviewed by Cursor Bugbot for commit d86ec73. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Preserve wildcard host
0.0.0.0in pairing URL instead of resolving to container IPStops replacing the wildcard host
0.0.0.0with the container's IP address when generating the pairing URL. The wildcard host is now passed through as-is, keeping the URL usable across network contexts.Macroscope summarized d86ec73.