Check List
Describe the bug
|
// `undefined` uses Node's default (try `::` with fallback to `0.0.0.0`) |
|
ip: undefined, |
In default setting, "hexo-server" will run at [::].
But "hexo-server" output localhost in console.
Such prompts mislead users, and may bring security risks.
|
if (ip === '0.0.0.0' || ip === '::') { |
|
hostname = 'localhost'; |
|
} |
Expected behavior
"hexo-server" should output the real listening address in console.
How to reproduce
hexo init
hexo s
- visit the localhost address like "[::1]:4000", and found accessible.
- visit the LAN address like "192.168.xx.x:4000", and found accessible.
- visit the WAN address like "xxx.xxx.xxx.xxx:4000", and found accessible(If you have a public network address and open this port).
Screenshots
No response
Environment information
windows 10
debian 12
node 22
Additional context
Additionally and Personally, I would expected "hexo-server" should listen localhost in default to reduce security risks.
Check List
Describe the bug
hexo-server/index.js
Lines 8 to 9 in d5ed997
In default setting, "hexo-server" will run at
[::].But "hexo-server" output
localhostin console.Such prompts mislead users, and may bring security risks.
hexo-server/lib/server.js
Lines 74 to 76 in d5ed997
Expected behavior
"hexo-server" should output the real listening address in console.
How to reproduce
hexo inithexo sScreenshots
No response
Environment information
Additional context