mirror of
https://github.com/django/daphne.git
synced 2024-11-23 00:16:33 +03:00
Get the right client address
This commit is contained in:
parent
3161715238
commit
45ac09aa04
|
@ -37,7 +37,7 @@ def parse_x_forwarded_for(headers,
|
||||||
address_value = header_value(headers, address_header_name)
|
address_value = header_value(headers, address_header_name)
|
||||||
|
|
||||||
if ',' in address_value:
|
if ',' in address_value:
|
||||||
address_value = address_value.split(",")[0].strip()
|
address_value = address_value.split(",")[-1].strip()
|
||||||
|
|
||||||
result = [address_value, 0]
|
result = [address_value, 0]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user