diff options
author | Alex Auvolat <lx@deuxfleurs.fr> | 2025-02-17 18:47:06 +0100 |
---|---|---|
committer | Alex Auvolat <lx@deuxfleurs.fr> | 2025-02-17 18:47:06 +0100 |
commit | c5df820e2c2b4bff5e239b8e99f07178b98b3f5a (patch) | |
tree | 26fa3dd297ee1c8bb55f5f7573a5c3396b030507 /src/api/common/cors.rs | |
parent | a04d6cd5b8a3acffb8daeee00aed744fb1a78ea3 (diff) | |
download | garage-c5df820e2c2b4bff5e239b8e99f07178b98b3f5a.tar.gz garage-c5df820e2c2b4bff5e239b8e99f07178b98b3f5a.zip |
api: start refactor of signature to calculate checksums earlier
Diffstat (limited to 'src/api/common/cors.rs')
-rw-r--r-- | src/api/common/cors.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/common/cors.rs b/src/api/common/cors.rs index 14369b56..09b55c13 100644 --- a/src/api/common/cors.rs +++ b/src/api/common/cors.rs @@ -14,9 +14,9 @@ use crate::common_error::{ }; use crate::helpers::*; -pub fn find_matching_cors_rule<'a>( +pub fn find_matching_cors_rule<'a, B>( bucket_params: &'a BucketParams, - req: &Request<impl Body>, + req: &Request<B>, ) -> Result<Option<&'a GarageCorsRule>, CommonError> { if let Some(cors_config) = bucket_params.cors_config.get() { if let Some(origin) = req.headers().get("Origin") { @@ -132,8 +132,8 @@ pub async fn handle_options_api( } } -pub fn handle_options_for_bucket( - req: &Request<IncomingBody>, +pub fn handle_options_for_bucket<B>( + req: &Request<B>, bucket_params: &BucketParams, ) -> Result<Response<EmptyBody>, CommonError> { let origin = req |