From 8129a9829165c8543b2ab2d32e8f20ed54ced9e5 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 28 Feb 2022 11:15:53 +0100 Subject: Process CORS earlier in pipeline --- src/web/web_server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/web') diff --git a/src/web/web_server.rs b/src/web/web_server.rs index 6c7d7c35..15935cba 100644 --- a/src/web/web_server.rs +++ b/src/web/web_server.rs @@ -133,7 +133,7 @@ async fn serve_file(garage: Arc, req: &Request) -> Result handle_options(req, &bucket).await, + Method::OPTIONS => handle_options(garage.clone(), req, Some(bucket_name.to_string())).await, Method::HEAD => handle_head(garage.clone(), req, bucket_id, &key, None).await, Method::GET => handle_get(garage.clone(), req, bucket_id, &key, None).await, _ => Err(ApiError::BadRequest("HTTP method not supported".into())), -- cgit v1.2.3