def get_cors(bucket_name):
response = Response()
cors = BUCKET_CORS.get(bucket_name)
if not cors:
# TODO: check if bucket exists, otherwise return 404-like error
cors = {
'CORSConfiguration': []
}
body = xmltodict.unparse(cors)
response._content = body
response.status_code = 200
return response
评论列表
文章目录