In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is about the sample analysis of RGW S3 CORS. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1. RGW S3 CORS core class diagram.
Second, RGW S3 CORS processing class diagram.
Third, RGW S3 CORS operation parsing.
1. PUT CORS operation.
RGWPutCORS::execute ()
| | _ RGWPutCORS_ObjStore_S3::get_params () |
| | _ _ find the CORSConfiguration domain from the HTTP request data stream and convert it to a RGWCORSConfiguration_S3 object |
| | _ _ RGWCORSConfiguration_S3::encode () serializes RGWCORSConfiguration_S3 object |
| | _ _ for setting the object's CORS |
| | _ _ RGWRados::get_bucket_instance_obj () gets the object information of the CORS attribute to be set |
| | _ _ RGWRados::set_attrs () sets the CORS attribute to the attribute list of object and uses RGW_ATTR_CORS as the index |
| | _ _ for CORS that sets bucket |
| | _ _ rgw_bucket_set_attrs () sets the CORS attribute to the attribute list of bucket and uses RGW_ATTR_CORS as the index |
2. GET CORS operation.
RGWGetCORS::execute ()
| | _ RGWOp::read_bucket_cors () |
| | _ _ gets the RGW_ATTR_CORS attribute value of the specified bucket |
| | _ _ RGWCORSConfiguration::decode () restores the value of the CORS attribute of the specified bucket to a RGWCORSConfiguration object |
3. DELETE CORS operation.
RGWDeleteCORS::execute ()
| | _ RGWOp::read_bucket_cors () |
| | _ _ gets the RGW_ATTR_CORS attribute value of the specified bucket |
| | _ _ RGWCORSConfiguration::decode () restores the value of the CORS attribute of the specified bucket to a RGWCORSConfiguration object |
| | _ _ RGWRados::get_bucket_instance_obj () gets the object information of the CORS attribute to be deleted |
| | _ _ for deleting an object's CORS |
| | _ _ get_obj_attrs () gets the attributes of the object |
| | _ _ Delete the RGW_ATTR_ cors value of the object attribute |
| | _ _ RGWRados::set_attrs () resets the properties of the object to the ceph cluster |
| | _ _ for deleting the CORS of bucket |
| | _ _ get_system_obj_attrs () gets the attribute of bucket |
| | _ _ Delete the RGW_ATTR_ cors value of the object attribute |
| | _ _ rgw_bucket_set_attrs () resets the properties of bucket to the ceph cluster |
4. Options CORS operation.
RGWOptionsCORS::execute ()
| | _ RGWOp::read_bucket_cors () |
| | _ _ gets the RGW_ATTR_CORS attribute value of the specified bucket |
| | _ _ RGWCORSConfiguration::decode () restores the value of the CORS attribute of the specified bucket to
| | _ _ read HTTP_ORIGIN/HTTP_ACCESS_CONTROL_REQUEST_METHOD/HTTP_ACCESS_CONTROL_REQUEST_ headers value from HTTP request data stream |
| | _ RGWOptionsCORS::validate_cors_request () |
| | _ RGWCORSRule::host_name_rule () |
| | _ _ traverse the RGWCORSConfiguration::rules list and call for each RGWCORSRule |
| | _ RGWCORSRule::is_origin_present () |
| | _ _ is_string_in_set () determines whether the string is in the RGWCORSRule::allowed_origins list, and returns RGWCORSRule if the string is returned |
| | _ validate_cors_rule_method () |
| | _ _ gets the method name in the request string |
| | _ _ RGWCORSRule::get_allowed_methods () gets the allowed_methods field corresponding to the rule |
| | _ _ compare the obtained allowed_methods field with the method name in the request string to see whether the request string method name is in the allowed_methods field |
Thank you for reading! This is the end of this article on "sample Analysis of RGW S3 CORS". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.