Skip to content

Commit e33a16f

Browse files
committed
use localhost as default local hostname
so this list isn't empty when these handlers are used outside NotebookApp
1 parent 1901eea commit e33a16f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notebook/base/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def check_host(self):
435435
addr = ipaddress.ip_address(host)
436436
except ValueError:
437437
# Not an IP address: check against hostnames
438-
allow = host in self.settings.get('local_hostnames', [])
438+
allow = host in self.settings.get('local_hostnames', ['localhost'])
439439
else:
440440
allow = addr.is_loopback
441441

0 commit comments

Comments
 (0)