chore: backup before migration to new repo
This commit is contained in:
@@ -30,14 +30,20 @@ pub async fn api_key_validation(
|
||||
tracing::info!("[MIDDLEWARE] Path: {:?}", request.uri().path());
|
||||
|
||||
let headers = request.headers();
|
||||
tracing::info!(
|
||||
"[MIDDLEWARE] Headers: {:?}",
|
||||
headers.keys().collect::<Vec<_>>()
|
||||
);
|
||||
tracing::info!("[MIDDLEWARE] All headers: {:?}", headers);
|
||||
|
||||
let api_key = match extract_api_key(headers) {
|
||||
Ok(key) => {
|
||||
tracing::info!("[MIDDLEWARE] API key extracted, length: {}", key.len());
|
||||
if key.len() > 8 {
|
||||
tracing::info!(
|
||||
"[MIDDLEWARE] Key value: {}...{}",
|
||||
&key[..4],
|
||||
&key[key.len() - 4..]
|
||||
);
|
||||
} else {
|
||||
tracing::info!("[MIDDLEWARE] Key value: ****");
|
||||
}
|
||||
key
|
||||
}
|
||||
Err(status) => {
|
||||
@@ -59,7 +65,10 @@ pub async fn api_key_validation(
|
||||
r
|
||||
}
|
||||
Ok(None) => {
|
||||
tracing::warn!("[MIDDLEWARE] API key not found in database");
|
||||
tracing::warn!(
|
||||
"[MIDDLEWARE] API key NOT FOUND in database for hash: {}",
|
||||
&key_hash[..16]
|
||||
);
|
||||
return Response::builder()
|
||||
.status(StatusCode::UNAUTHORIZED)
|
||||
.body(axum::body::Body::empty())
|
||||
|
||||
Reference in New Issue
Block a user