Open
Description
Describe the bug
Steps to Reproduce
Run the file server with permission --allow-sys=networkInterfaces
and set the --host
to a loopback value (e.g. localhost
, 127.0.0.1
, etc.).
deno run --allow-net=localhost --allow-read --allow-sys=networkInterfaces jsr:@std/http/file-server --host=localhost
Expected behavior
The onListen
event handler should not print a network (non-loopback) address in the informational output — because it will not be reachable:
Listening on:
- Local: http://127.0.0.1:8000
Observed behavior
Non-loopback addresses are printed and represented as reachable:
Listening on:
- Local: http://127.0.0.1:8000
- Network: http://10.0.1.100:8000
Environment
- OS: macOS 14.5
- deno version: 1.45.4
- std version: 2024.07.26