convert strings to lowercase for case insensitive comparison

This commit is contained in:
KevinDuffy94 2024-07-24 10:32:48 -04:00 committed by GitHub
parent 19e63ffccc
commit 9f9997b5d4
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 == api_key => {
Some(token) if token.to_lowercase() == api_key.to_lowercase() => {
let response = next.run(request).await;
Ok(response)
}