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 dd7daf9 commit edb2f1bCopy full SHA for edb2f1b
jupyter_server/serverapp.py
@@ -2377,7 +2377,8 @@ def local_url(self) -> str:
2377
parts = self._get_urlparts(include_token=True)
2378
# Update with custom pieces.
2379
if not self.sock:
2380
- parts = parts._replace(netloc=f"127.0.0.1:{self.port}")
+ localhost = "[::1]" if ":" in self.ip else "127.0.0.1"
2381
+ parts = parts._replace(netloc=f"{localhost}:{self.port}")
2382
return parts.geturl()
2383
2384
@property
0 commit comments