Commit graph

1 commit

Author SHA1 Message Date
Demian Parkhomenko
56d8dc120c lib: add warning when binding inspector to public IP
Add `isLoopback` function to `internal/net` module to check if a given
host is a loopback address.

Add a warning when binding the inspector to a public IP with an open
port, as it allows external hosts to connect to the inspector.

Fixes: https://github.com/nodejs/node/issues/23444
Refs: https://nodejs.org/api/cli.html#--inspecthostport
PR-URL: https://github.com/nodejs/node/pull/55736
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2025-03-21 08:11:10 -07:00