aboutsummaryrefslogtreecommitdiff
path: root/src/api/k2v/api_server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-28 00:27:54 +0100
committerAlex Auvolat <alex@adnab.me>2024-02-28 00:27:54 +0100
commit84d79cadaa722752fda062c23b5ab33924d80320 (patch)
tree471ad303d34e992ee151227b40dd5261b85711b1 /src/api/k2v/api_server.rs
parent4d8dd1e349f47daa748a42fffe56c58f02c2ed60 (diff)
downloadgarage-84d79cadaa722752fda062c23b5ab33924d80320.tar.gz
garage-84d79cadaa722752fda062c23b5ab33924d80320.zip
[fix-presigned] presigned requests: allow x-amz-* query parameters to stand in for equivalent headers
Diffstat (limited to 'src/api/k2v/api_server.rs')
-rw-r--r--src/api/k2v/api_server.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/k2v/api_server.rs b/src/api/k2v/api_server.rs
index e97da2af..5ed7e286 100644
--- a/src/api/k2v/api_server.rs
+++ b/src/api/k2v/api_server.rs
@@ -69,7 +69,7 @@ impl ApiHandler for K2VApiServer {
async fn handle(
&self,
- req: Request<IncomingBody>,
+ mut req: Request<IncomingBody>,
endpoint: K2VApiEndpoint,
) -> Result<Response<ResBody>, Error> {
let K2VApiEndpoint {
@@ -86,7 +86,8 @@ impl ApiHandler for K2VApiServer {
return Ok(options_res.map(|_empty_body: EmptyBody| empty_body()));
}
- let (api_key, mut content_sha256) = check_payload_signature(&garage, "k2v", &req).await?;
+ let (api_key, mut content_sha256) =
+ check_payload_signature(&garage, "k2v", &mut req).await?;
let api_key = api_key
.ok_or_else(|| Error::forbidden("Garage does not support anonymous access yet"))?;