Skip to content

🚨 unwelcome pr from bot 🚨 - #1649

Closed
paoValle wants to merge 1 commit into
nuxt:mainfrom
paoValle:fix/localhost-loopback-warning
Closed

paoValle wants to merge 1 commit into
nuxt:mainfrom
paoValle:fix/localhost-loopback-warning

Conversation

@paoValle

Copy link
Copy Markdown

devServer.host: 'my-app.localhost' was announced as reachable from the network, and the Network: hint was suppressed for it: the check compared the requested hostname against an exact-match set, so any name under .localhost read as a public host. RFC 6761 §6.3 resolves localhost and 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 isLoopbackAddress helper is reused, so 127.0.0.0/8 and IPv4-mapped forms come with it.

packages/nuxt-cli/test/unit/listen.spec.ts: 61 passed, including two new cases on createListener (a .localhost name bound to loopback does not warn; a name bound to a LAN address does) and one on a real bind to 0.0.0.0. Against main the .localhost case fails with the warning present. eslint is clean on the three touched files; tsc --noEmit reports only the pre-existing @nuxt/cli workspace-resolution error, which needs pnpm -r build first.

Fixes #1644.

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.
@github-actions

Copy link
Copy Markdown
Contributor

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:

  1. Never let an LLM speak for you - all comments, issues, and PR descriptions should be written in your own words, reflecting your own understanding.
  2. Never let an LLM think for you - only submit contributions you fully understand and can explain.

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.

@github-actions github-actions Bot changed the title fix(dev): decide network exposure from the bound address 🚨 unwelcome pr from bot 🚨 Oct 31, 2026
@github-actions github-actions Bot closed this Oct 31, 2026
@codspeed

codspeed Bot commented Oct 31, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 2 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 2 untouched benchmarks


Comparing paoValle:fix/localhost-loopback-warning (9882d57) with main (cd8f364)

Open in CodSpeed

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@cd8f364). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dev: false "reachable from the network" warning when devServer.host is a *.localhost subdomain

2 participants