Skip to content

Commit

Permalink
convert header to string
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinDuffy94 authored Jul 25, 2024
1 parent 9f9997b commit c5a982d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion router/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ pub async fn run(
request: axum::extract::Request,
next: axum::middleware::Next| async move {
match headers.get(AUTHORIZATION) {
Some(token) if token.to_lowercase() == api_key.to_lowercase() => {
Some(token) if token.to_str().to_lowercase() == api_key.to_lowercase() => {
let response = next.run(request).await;
Ok(response)
}
Expand Down

0 comments on commit c5a982d

Please sign in to comment.