Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Set 0.0.0.0 to default hostname #493

Merged
merged 1 commit into from
Nov 14, 2016
Merged

Conversation

EliKrumholz
Copy link
Contributor

See issue #492. Using a default hostname of 127.0.0.1 overrides the http module's expected default hostname as described here: https://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback. This can cause deployment errors on services such as heroku.

If the hostname is omitted, the server will accept connections on any IPv6 address (::) when IPv6 is available, or any IPv4 address (0.0.0.0) otherwise.

The node http module, which express inherits from, use 0.0.0.0 as the default (as described here: https://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback)

> If the hostname is omitted, the server will accept connections on any IPv6 address (::) when IPv6 is available, or any IPv4 address (0.0.0.0) otherwise.
@aj-may
Copy link

aj-may commented Nov 14, 2016

👍

@benbrown
Copy link
Contributor

@EliKrumholz Thank you for catching this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants