root: fix IP detection when using multiple reverse proxies

This commit is contained in:
Jens Langhammer
2020-09-20 13:36:23 +02:00
parent 2f4139df65
commit 9f403a71ed
2 changed files with 7 additions and 4 deletions

View File

@ -14,7 +14,7 @@ def _get_client_ip_from_meta(meta: Dict[str, Any]) -> Optional[str]:
)
for _header in headers:
if _header in meta:
return meta.get(_header)
return meta.get(_header).split(", ")[0]
return None