Skip to content

fix: omit network URLs for specific listeners - #859

Open
ryanchou1994 wants to merge 1 commit into
vercel:mainfrom
ryanchou1994:fix/loopback-network-banner
Open

ryanchou1994 wants to merge 1 commit into
vercel:mainfrom
ryanchou1994:fix/loopback-network-banner

Conversation

@ryanchou1994

Copy link
Copy Markdown

Related Issues

Fixes #667.

Description

Changed

A server started with --listen tcp://localhost:3000 currently advertises a LAN URL even though it only listens on loopback. Generate the extra network URL only for wildcard bindings (:: or 0.0.0.0). Specific bindings keep their existing local URL. Listener behavior is unchanged.

Added

Regression coverage for real localhost, IPv4 and IPv6 loopback listeners, plus address fixtures for wildcard and specific interfaces. The README now documents the localhost command and banner behavior.

Caveats/Problems/Issues

Tests ran in an isolated environment with a synthetic npm update-check response and NIC metadata. HTTP/TLS traffic used local fixtures; physical LAN routing was not tested.

Checklist

  • Related issue and behavior change described above.
  • pnpm test passes on macOS and Linux: 37 tests, including TypeScript checks.
  • pnpm lint and pnpm compile pass.
  • The changed calculation and test cases are documented; the existing startServer TSDoc is preserved.
  • The compiled CLI was checked with both loopback and wildcard bindings.

Only advertise another interface when the server binds a wildcard address. Keep loopback and specific-interface URLs accurate in the startup banner.
Copilot AI lite review requested due to automatic review settings September 9, 2026 16:53
@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

@ryanchou1994 is attempting to deploy a commit to the Internal Playground Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Banner shows non-loopback addr, even when serving on loopback interface only

2 participants