fix(proxy_server.py): check if master key is str before hashing

This commit is contained in:
Krrish Dholakia 2024-03-09 16:51:11 -08:00
parent 03f0c968f9
commit 7a29fe9525
2 changed files with 4 additions and 2 deletions

View file

@ -55,7 +55,7 @@ def test_custom_auth(client):
}
# Your bearer token
token = os.getenv("PROXY_MASTER_KEY")
print(f"token: {token}")
headers = {"Authorization": f"Bearer {token}"}
response = client.post("/chat/completions", json=test_data, headers=headers)
pytest.fail("LiteLLM Proxy test failed. This request should have been rejected")