aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-02-28 11:15:53 +0100
committerAlex Auvolat <alex@adnab.me>2022-02-28 12:22:39 +0100
commit8129a9829165c8543b2ab2d32e8f20ed54ced9e5 (patch)
tree5a1eae4279761a82722dc1224b1261a72aba96da /src/web
parent54e02b4c3ba466988c50984aba9b60dc51b6cdce (diff)
downloadgarage-8129a9829165c8543b2ab2d32e8f20ed54ced9e5.tar.gz
garage-8129a9829165c8543b2ab2d32e8f20ed54ced9e5.zip
Process CORS earlier in pipeline
Diffstat (limited to 'src/web')
-rw-r--r--src/web/web_server.rs2
1 files changed, 1 insertions, 1 deletions
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<Garage>, req: &Request<Body>) -> Result<Response
);
let ret_doc = match *req.method() {
- Method::OPTIONS => 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())),