From 7314ba69a6c8e844ce99c4e15da5d7fa137cf475 Mon Sep 17 00:00:00 2001 From: yuliyang Date: Mon, 6 Aug 2018 10:33:12 +0800 Subject: [PATCH] rgw: cors rules num limit According to AWS S3, an cors rules can have up to 100 rules. Signed-off-by: yuliyang (cherry picked from commit c97ee932f380a673b52ffcb1986b015e06246844) --- src/common/legacy_config_opts.h | 1 + src/common/options.cc | 4 ++++ src/rgw/rgw_common.cc | 1 + src/rgw/rgw_common.h | 1 + src/rgw/rgw_rest_s3.cc | 17 +++++++++++++++++ 5 files changed, 24 insertions(+) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index a664e9b18f46..1dee2cbea1b4 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -1532,3 +1532,4 @@ OPTION(rgw_max_objs_per_shard, OPT_INT) OPTION(rgw_reshard_thread_interval, OPT_U32) // maximum time between rounds of reshard thread processing OPTION(rgw_acl_grants_max_num, OPT_INT) // According to AWS S3(http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html), An ACL can have up to 100 grants. +OPTION(rgw_cors_rules_max_num, OPT_INT) // According to AWS S3(http://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html), An cors can have up to 100 rules. diff --git a/src/common/options.cc b/src/common/options.cc index 8bf2f24830cb..9ae3d74d2d2d 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -4939,6 +4939,10 @@ std::vector