Skip to content

Commit 1b69205

Browse files
authored
Merge pull request #3703 from minrk/public-host
add `or 127.0.0.1` when listening on all-ips
2 parents b8b6633 + 357b8e7 commit 1b69205

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notebook/notebookapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,7 @@ def display_url(self):
13581358
url += '/'
13591359
else:
13601360
if self.ip in ('', '0.0.0.0'):
1361-
ip = socket.gethostname()
1361+
ip = "(%s or 127.0.0.1)" % socket.gethostname()
13621362
else:
13631363
ip = self.ip
13641364
url = self._url(ip)

0 commit comments

Comments
 (0)