aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_router.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/s3_router.rs')
-rw-r--r--src/api/s3_router.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/api/s3_router.rs b/src/api/s3_router.rs
index 2a68d79e..95a7eceb 100644
--- a/src/api/s3_router.rs
+++ b/src/api/s3_router.rs
@@ -414,8 +414,7 @@ pub enum Endpoint {
// It's intended to be used with HTML forms, using a multipart/form-data body.
// It works a lot like presigned requests, but everything is in the form instead
// of being query parameters of the URL, so authenticating it is a bit different.
- PostObject {
- },
+ PostObject,
}}
impl Endpoint {
@@ -430,7 +429,11 @@ impl Endpoint {
let path = uri.path().trim_start_matches('/');
let query = uri.query();
if bucket.is_none() && path.is_empty() {
- return Ok((Self::ListBuckets, None));
+ if *req.method() == Method::OPTIONS {
+ return Ok((Self::Options, None));
+ } else {
+ return Ok((Self::ListBuckets, None));
+ }
}
let (bucket, key) = if let Some(bucket) = bucket {