Skip to content

Commit

Permalink
fix capitalization and matching
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyftang committed Feb 23, 2024
1 parent 7ed6c5e commit f217791
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions router/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
})
Expand Down Expand Up @@ -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());
})
Expand Down

0 comments on commit f217791

Please sign in to comment.