-
-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Check List
- I have already read README.
- I have already searched existing issues and they are not help to me.
- I examined error or warning messages and it's difficult to solve.
- I am using the latest version of this repository.
- I am using the latest version of Hexo.
- My Node.js is matched the required version.
Describe the bug
Lines 8 to 9 in d5ed997
| // `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.
Lines 74 to 76 in d5ed997
| 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 inithexo 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
localhostin default to reduce security risks.
Metadata
Metadata
Assignees
Labels
No labels