Skip to content

Commit 47b53c0

Browse files
committed
display_url: Don't duplicate public_url and local_url if they are the same
1 parent dd7daf9 commit 47b53c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jupyter_server/serverapp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2385,7 +2385,9 @@ def display_url(self) -> str:
23852385
"""Human readable string with URLs for interacting
23862386
with the running Jupyter Server
23872387
"""
2388-
url = self.public_url + "\n " + self.local_url
2388+
url = self.public_url
2389+
if self.public_url != self.local_url:
2390+
url = f"{url}\n {self.local_url}"
23892391
return url
23902392

23912393
@property

0 commit comments

Comments
 (0)