mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
feat(ai-gateway): send the serving route to the verify endpoint
This commit is contained in:
parent
a5203ed000
commit
1d04e56e6e
1 changed files with 2 additions and 2 deletions
|
|
@ -47,12 +47,12 @@ impl PythonAuthClient {
|
|||
|
||||
#[axum::async_trait]
|
||||
impl KeyAuthenticator for PythonAuthClient {
|
||||
async fn verify(&self, key: &str) -> Result<UserApiKeyAuth, AuthError> {
|
||||
async fn verify(&self, key: &str, route: &str) -> Result<UserApiKeyAuth, AuthError> {
|
||||
let response = self
|
||||
.http
|
||||
.post(&self.verify_url)
|
||||
.header(DATA_PLANE_KEY_HEADER, &self.data_plane_key)
|
||||
.json(&serde_json::json!({ "api_key": key }))
|
||||
.json(&serde_json::json!({ "api_key": key, "route": route }))
|
||||
.send()
|
||||
.await
|
||||
.map_err(|err| AuthError::Upstream(err.to_string()))?;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue