From 357b8e775883276bf22abbe3326eeb7c4bfd9adc Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 21 Jun 2018 12:08:11 +0200 Subject: [PATCH] =?UTF-8?q?add=20=E2=80=9Cor=20127.0.0.1=E2=80=9D=20for=20?= =?UTF-8?q?all-ips?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Makes it not a copyable URL anymore, but there’s no way for a copyable host to work in general in this case. --- notebook/notebookapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index bbd462511..b860866bd 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -1358,7 +1358,7 @@ class NotebookApp(JupyterApp): url += '/' else: if self.ip in ('', '0.0.0.0'): - ip = socket.gethostname() + ip = "(%s or 127.0.0.1)" % socket.gethostname() else: ip = self.ip url = self._url(ip)