diff --git a/router/src/server.rs b/router/src/server.rs index 832d38e45..57e927ad8 100644 --- a/router/src/server.rs +++ b/router/src/server.rs @@ -124,7 +124,7 @@ async fn completions_v1( let _ = headers.get("authorization").map_or((), |x| { x.to_str().map_or((), |y| { - y.strip_prefix("Bearer :").map_or((), |token| { + y.strip_prefix("Bearer ").map_or((), |token| { println!("token!! {token}"); gen_req.parameters.api_token = Some(token.to_string()); }) @@ -197,9 +197,9 @@ async fn chat_completions_v1( println!("{0}: {1}", k.as_str(), v.to_str().unwrap_or("N/A")); } - let _ = headers.get("Authorization").map_or((), |x| { + let _ = headers.get("authorization").map_or((), |x| { x.to_str().map_or((), |y| { - y.strip_prefix("Bearer :").map_or((), |token| { + y.strip_prefix("Bearer ").map_or((), |token| { println!("token!! {token}"); gen_req.parameters.api_token = Some(token.to_string()); })