Skip to content

fix: keep requested host when falling back to a different port - #869

Merged
AndyBitz merged 1 commit into
mainfrom
fix/keep-host-on-port-fallback
Nov 6, 2026
Merged

AndyBitz merged 1 commit into
mainfrom
fix/keep-host-on-port-fallback

Conversation

@AndyBitz

@AndyBitz AndyBitz commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor
  • When the requested port is occupied, serve falls back to a random port but drops the requested host, so --listen tcp://127.0.0.1:3000 could end up listening on all interfaces.
  • The fallback now keeps the original host and only changes the port.
  • Added a test for the 127.0.0.1 fallback and tightened the existing ::1 fallback test.

@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
servetest Building Building Preview Nov 6, 2026 10:44am UTC

@AndyBitz
AndyBitz marked this pull request as ready for review November 6, 2026 10:46
@AndyBitz
AndyBitz merged commit 86e42e2 into main Nov 6, 2026
11 checks passed
@AndyBitz
AndyBitz deleted the fix/keep-host-on-port-fallback branch November 6, 2026 10:46

This branch was successfully deployed

1 active deployment
Preview — caee3564 Deployed Nov 6, 2026 by vercel[bot]
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.

1 participant