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()
|
local_net = get_local_ipv4()
|
||||||
if not local_net:
|
if not local_net:
|
||||||
return False
|
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)
|
return host.startswith('127.0.0.1') or host.startswith(local_net)
|
||||||
|
|
||||||
def getaddrinfo(*args):
|
def getaddrinfo(*args):
|
||||||
|
|
Loading…
Reference in a new issue