From 8e4a8d7e07cab84a3a2242e847137fd0e60f35ad Mon Sep 17 00:00:00 2001 From: caipira113 Date: Wed, 20 Mar 2024 14:42:03 +0900 Subject: [PATCH] Accept deleted --- src/handlers.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/handlers.rs b/src/handlers.rs index f8e1712..e01fa22 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -69,11 +69,12 @@ async fn api_v2(data: Data, req: HttpRequest, bytes: Bytes) -> impl Re } else { let mut headers = req.headers().clone(); rewrite_host_header(&mut headers, &data.registry); - if req.path().starts_with("/v2/") && req.path().contains("/manifests/") { - headers.insert( + /*if req.path().starts_with("/v2/") && req.path().contains("/manifests/") { + /*headers.insert( "Accept".parse().unwrap(), - "application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.v2+json".parse().unwrap()); - } + "application/vnd.docker.distribution.manifest.v2+json".parse().unwrap());*/ + info!("Headers: {}", headers.iter().map(|(k, v)| format!("{}: {}", k, v.to_str().unwrap())).collect::>().join(", ")); + }*/ if let Some(auth) = data.auth.clone() { headers.insert("Authorization".parse().unwrap(), auth.parse().unwrap()); }