We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd1ecc0 commit 26a032cCopy full SHA for 26a032c
jupyter_server/serverapp.py
@@ -1386,14 +1386,13 @@ def connection_url(self):
1386
return self.get_url(ip=ip)
1387
1388
def get_url(self, ip=None, path=None, token=None):
1389
- """Build a url for the application.
1390
- """
+ """Build a url for the application with reasonable defaults."""
1391
if not ip:
1392
- ip = self.ip
+ ip = self.ip if self.ip else 'localhost'
1393
if not path:
1394
path = url_path_join(self.base_url, self.default_url)
1395
# Build query string.
1396
- if self.token:
+ if token:
1397
token = urllib.parse.urlencode({'token': token})
1398
# Build the URL Parts to dump.
1399
urlparts = urllib.parse.ParseResult(
0 commit comments