mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(proxy/utils.py): remove original auth sk-.. key before logging to spend logs
This commit is contained in:
parent
d52f5234b4
commit
7e0adbb9bd
1 changed files with 5 additions and 0 deletions
|
@ -838,6 +838,11 @@ def get_logging_payload(kwargs, response_obj, start_time, end_time):
|
|||
# hash the api_key
|
||||
api_key = hash_token(api_key)
|
||||
|
||||
if "headers" in metadata and "authorization" in metadata["headers"]:
|
||||
metadata["headers"].pop(
|
||||
"authorization"
|
||||
) # do not store the original `sk-..` api key in the db
|
||||
|
||||
payload = {
|
||||
"request_id": id,
|
||||
"call_type": call_type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue