convert header to string

This commit is contained in:
KevinDuffy94 2024-07-25 09:16:24 -04:00 committed by GitHub
parent 9f9997b5d4
commit c5a982de82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)
}