mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(user_api_key_auth.py): fix client_ip
This commit is contained in:
parent
55217fa8d7
commit
e86cb90f98
1 changed files with 2 additions and 0 deletions
|
@ -1275,6 +1275,8 @@ def _get_request_ip_address(
|
|||
client_ip = request.headers["x-forwarded-for"]
|
||||
elif request.client is not None:
|
||||
client_ip = request.client.host
|
||||
else:
|
||||
client_ip = ""
|
||||
|
||||
return client_ip
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue