mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
Merge pull request #4916 from BerriAI/litellm_fix_ui_login
Feat UI - allow using custom header for litellm api key
This commit is contained in:
commit
1a34756159
4 changed files with 109 additions and 78 deletions
|
@ -1314,8 +1314,9 @@ def get_api_key_from_custom_header(
|
|||
# use this as the virtual key passed to litellm proxy
|
||||
custom_litellm_key_header_name = custom_litellm_key_header_name.lower()
|
||||
verbose_proxy_logger.debug(
|
||||
"searching for custom_litellm_key_header_name= %s",
|
||||
"searching for custom_litellm_key_header_name= %s, in headers=%s",
|
||||
custom_litellm_key_header_name,
|
||||
request.headers,
|
||||
)
|
||||
custom_api_key = request.headers.get(custom_litellm_key_header_name)
|
||||
if custom_api_key:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue