Merge pull request #4139 from daf/fix-allow-remote-access-with-all-ips

Fix default value method for `allow_remote_access` when ip is '*'
pull/4182/head
Thomas Kluyver 7 years ago committed by GitHub
commit a7033b8067
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -865,6 +865,12 @@ class NotebookApp(JupyterApp):
@default('allow_remote_access')
def _default_allow_remote(self):
"""Disallow remote access if we're listening only on loopback addresses"""
# if blank, self.ip was configured to "*" meaning bind to all interfaces,
# see _valdate_ip
if self.ip == "":
return True
try:
addr = ipaddress.ip_address(self.ip)
except ValueError:

Loading…
Cancel
Save