-
Notifications
You must be signed in to change notification settings - Fork 441
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
Use IP address as hostname when configured #1181
Conversation
This isn't perfect, because running locally with Docker the URL will include |
One option would be to support |
@jonatanklosko should we convert 127.0.0.1 and 0.0.0.0 tuples to localhost? |
This appears to work for me. Thanks @jonatanklosko ! @josevalim (I can't comment on the Docker situation.) |
That's what I've been thinking, but actually |
Yes, browsers redirect the address to localhost; however, in this case it is configuration for cowboy which causes it to bind to all available IP addresses, not just localhost. For me this is a salient issue as livebook (by default, at least) exposes the local filesystem to a limited extent, even allowing the creation of local directories, and many devs often equate Perhaps a useful compromise would be to emit a separate line on the console when |
We don't use 0.0.0.0 by default, so I am not worried about it. If someone is passing 0.0.0.0 explicitly, then I hope they know they are doing and the implications of it. So showing 0.0.0.0 on the terminal is fine. |
@josevalim did you mean localhost? |
I meant 0.0.0.0. So we don't hide it and the browser redirects it anyway. |
I see, so we are back to the Docker question. Inside Docker we use |
But docker can also bind to a different port, can't it? So we can't assume we know how it is accessed. Maybe we should change the message to say "Livebook listening to address: ..."? |
Ah right, good call! |
Closes #1180.