mirror of
https://github.com/g0ldyy/comet.git
synced 2026-01-12 01:16:12 +01:00
refactor: remove parsing logic for IP addresses that include a port
This commit is contained in:
@@ -47,10 +47,6 @@ def get_client_ip(request: Request):
|
||||
ip_part = ip_part.strip()
|
||||
if is_correct_ip(ip_part):
|
||||
return ip_part
|
||||
if ":" in ip_part:
|
||||
host = ip_part.split(":")[0]
|
||||
if is_correct_ip(host):
|
||||
return host
|
||||
else:
|
||||
if is_correct_ip(header_value):
|
||||
return header_value
|
||||
|
||||
Reference in New Issue
Block a user