Skip to content
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

Distinguishing Between Listening on 0.0.0.0 or 127.0.0.1 #558

Open
jimjkelly opened this issue Apr 26, 2016 · 1 comment
Open

Distinguishing Between Listening on 0.0.0.0 or 127.0.0.1 #558

jimjkelly opened this issue Apr 26, 2016 · 1 comment
Assignees

Comments

@jimjkelly
Copy link

jimjkelly commented Apr 26, 2016

Hi,

Not a huge issue, but especially sometimes if something is going haywire in connectivity in a Docker container running Harp, I quickly pop over to the logs and often see the now familiar Your server is listening at http://localhost:9000/. For a moment I think, "oh, yeah, that doesn't work" until I remember that Harp is lying to me, and doesn't distinguish between 0.0.0.0 and 127.0.0.1.

Looking at the code you can see why: https://github.com/sintaxi/harp/blob/master/bin/harp#L89

I was wondering if there was a good reason not to simply get rid of lines 88-93, and changing 94 to be like so:

var hostUrl = "http://" + ip + ":" + port + "/"

?

Or, if the localhost text is really preferred, limiting it to only 127.0.0.1? I'd be happy to throw together a pull request for this if there's interest.

@marineb
Copy link

marineb commented Sep 11, 2016

Would be nice.

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

No branches or pull requests

4 participants