mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-06 11:35:24 +08:00
use localhost as default local hostname
so this list isn't empty when these handlers are used outside NotebookApp
This commit is contained in:
parent
1901eeac63
commit
e33a16f42f
@ -435,7 +435,7 @@ class IPythonHandler(AuthenticatedHandler):
|
||||
addr = ipaddress.ip_address(host)
|
||||
except ValueError:
|
||||
# Not an IP address: check against hostnames
|
||||
allow = host in self.settings.get('local_hostnames', [])
|
||||
allow = host in self.settings.get('local_hostnames', ['localhost'])
|
||||
else:
|
||||
allow = addr.is_loopback
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user