Repository navigation
Conversation
A dev server bound to a `.localhost` name was announced as reachable from the network, and the `Network:` hint was suppressed for it, because the check compared the requested hostname against an exact-match list. RFC 6761 §6.3 resolves `localhost` and every name under it to loopback. The bound address answers the question directly, and covers a hosts-file entry pointing at loopback as well.
|
We've flagged this as a potential contribution without a human behind it. We welcome the thoughtful use of AI tools when contributing, but ask all contributors to follow two core principles:
Please review these AI-assisted contribution guidelines and update this contribution if needed. We're closing this for now as the account looks automated. If we got that wrong, please just reopen the PR and we'll take another look. |
Merging this PR will not alter performance1 warning
Comparing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1649 +/- ##
=======================================
Coverage ? 84.56%
=======================================
Files ? 183
Lines ? 11790
Branches ? 3379
=======================================
Hits ? 9970
Misses ? 1533
Partials ? 287 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
devServer.host: 'my-app.localhost'was announced as reachable from the network, and theNetwork:hint was suppressed for it: the check compared the requested hostname against an exact-match set, so any name under.localhostread as a public host. RFC 6761 §6.3 resolveslocalhostand every name under it to loopback.The address the socket actually bound answers the question directly — a loopback bind means only this machine can connect, whatever the host was called — and it also covers a hosts-file entry that maps a name to loopback. The existing
isLoopbackAddresshelper is reused, so127.0.0.0/8and IPv4-mapped forms come with it.packages/nuxt-cli/test/unit/listen.spec.ts: 61 passed, including two new cases oncreateListener(a.localhostname bound to loopback does not warn; a name bound to a LAN address does) and one on a real bind to0.0.0.0. Againstmainthe.localhostcase fails with the warning present.eslintis clean on the three touched files;tsc --noEmitreports only the pre-existing@nuxt/cliworkspace-resolution error, which needspnpm -r buildfirst.Fixes #1644.