-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serve on both IPv4 and IPv6 interfaces by default #35
Comments
We recommend using apache or nginx as a server for the static website. The hexo-server is for debugging purpose, we don't plan to expand its functionality to reach a standard server level. |
I use nginx on my production server, but wanted to use It's a pretty easy issue to solve: Node listens on all interfaces by default. I'll send a PR later this week when I'll have some time. |
This commit changes the default value of the `--ip` option to use Node's internal resolution. It means that it will try to bind to the unspecified IPv6 address `::` if available or else fall back to the unspecified IPv4 address `0.0.0.0`. In most systems, `::` also binds to `0.0.0.0` which effectively allows to listen on all interfaces. Closes hexojs#35
This commit changes the default value of the `--ip` option to use Node's internal resolution. It means that it will try to bind to the unspecified IPv6 address `::` if available or else fall back to the unspecified IPv4 address `0.0.0.0`. In most systems, `::` also binds to `0.0.0.0` which effectively allows to listen on all interfaces. Closes hexojs#35
This commit changes the default value of the `--ip` option to use Node's internal resolution. It means that it will try to bind to the unspecified IPv6 address `::` if available or else fall back to the unspecified IPv4 address `0.0.0.0`. In most systems, `::` also binds to `0.0.0.0` which effectively allows to listen on all interfaces. Closes hexojs#35
Would it be possible to push the updated version to npm? |
@demurgos will do it shortly. |
Done. Landed on npm. |
This commit is a fix following the PR hexojs#39. This PR changed the default behavior of the server to listen on all interfaces (both IPv4 and IPv6). This commit was missing the update of the default configuration, causing the server to still listen only to IPv4 by default. The current commit fixes this error by using `undefined` (Node's default) for the IP. - See hexojs#35 - See hexojs#39
Currently,
hexo serve
only listens to IPv4 intefaces. To get the IPv6::1
, you have to pass it explicitly with theip
option (but then the server is not bound to the IPv4 interfaces).Would it be possible to make
hexo serve
listen on all interfaces by default?The text was updated successfully, but these errors were encountered: