mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-06-19 15:52:08 +00:00
convert header to string
This commit is contained in:
parent
9f9997b5d4
commit
c5a982de82
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user