Merge pull request #3593 from takluyver/url-prefer-ipaddr

Prefer IP address over hostname when available
Thomas Kluyver 8 years ago committed by GitHub
commit 11743f1865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,7 +30,7 @@ New features:
- The files list now shows file sizes (:ghpull:`3539`)
- Add a quit button in the dashboard (:ghpull:`3004`)
- Display hostname in the terminal when running remotely (:ghpull:`3356`)
- Display hostname in the terminal when running remotely (:ghpull:`3356`, :ghpull:`3593`)
- Add slides exportation/download to the menu (:ghpull:`3287`)
- Add any extra installed nbconvert exporters to the "Download as" menu (:ghpull:`3323`)
- Editor: warning when overwriting a file that is modified on disk (:ghpull:`2783`)

@ -1339,11 +1339,10 @@ class NotebookApp(JupyterApp):
@property
def display_url(self):
hostname = socket.gethostname()
if self.ip in ('localhost', '127.0.0.1', hostname):
ip = self.ip
if self.ip in ('', '0.0.0.0'):
ip = socket.gethostname()
else:
ip = hostname
ip = self.ip
url = self._url(ip)
if self.token:
# Don't log full token if it came from config

Loading…
Cancel
Save