Add 169.254.* to local ips, remove unnecessary brackets
This commit is contained in:
parent
4631f2223b
commit
53364d6ddc
1 changed files with 1 additions and 1 deletions
|
@ -249,7 +249,7 @@ def isIp(ip):
|
|||
return False
|
||||
|
||||
|
||||
local_ip_pattern = re.compile(r"^(127\.)|(192\.168\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(::1$)|fe80")
|
||||
local_ip_pattern = re.compile(r"^127\.|192\.168\.|10\.|172\.1[6-9]\.|172\.2[0-9]\.|172\.3[0-1]\.|169\.254\.|::1$|fe80")
|
||||
def isPrivateIp(ip):
|
||||
return local_ip_pattern.match(ip)
|
||||
|
||||
|
|
Loading…
Reference in a new issue