fix local node detection
This commit is contained in:
parent
9468d90714
commit
446d143d67
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ def is_local(host):
|
|||
local_net = get_local_ipv4()
|
||||
if not local_net:
|
||||
return False
|
||||
local_net = local_net[:-2]
|
||||
local_net = '.'.join(local_net.split('.')[:-1]) + '.'
|
||||
return host.startswith('127.0.0.1') or host.startswith(local_net)
|
||||
|
||||
def getaddrinfo(*args):
|
||||
|
|
Loading…
Reference in a new issue