mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
Merge branch 'main' into litellm_fix_azure_api_version
This commit is contained in:
commit
409306b266
23 changed files with 490 additions and 103 deletions
|
@ -1269,8 +1269,9 @@ def _get_user_role(
|
|||
|
||||
def _get_request_ip_address(
|
||||
request: Request, use_x_forwarded_for: Optional[bool] = False
|
||||
) -> str:
|
||||
) -> Optional[str]:
|
||||
|
||||
client_ip = None
|
||||
if use_x_forwarded_for is True and "x-forwarded-for" in request.headers:
|
||||
client_ip = request.headers["x-forwarded-for"]
|
||||
elif request.client is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue