Support IPv6 on httpbin.org
This commit is contained in:
@@ -7,7 +7,7 @@ PROXY_REGEX = re.compile(
|
||||
flags=re.MULTILINE | re.IGNORECASE,
|
||||
)
|
||||
IPV4_REGEX = re.compile(
|
||||
r"^\s*(?P<host>(?:\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])(?:\.(?:\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])){3})(?::(?:\d|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?\s*$"
|
||||
r"^(?:[0-9:A-Fa-f]+,)?\s*(?P<host>(?:\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])(?:\.(?:\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])){3})(?::(?:\d|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?\s*$"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user