#NEWLINE# def setBucketCors( bucket ) : #NEWLINE# #INDENT# '\n    Set the cors access values on a boto bucket to allow general access to that\n    bucket.\n    :param bucket: a boto bucket to set.\n    ' #NEWLINE# cors = boto . s3 . cors . CORSConfiguration ( ) #NEWLINE# cors . add_rule ( id = 'girder_cors_rule' , allowed_method = [ 'HEAD' , 'GET' , 'PUT' , 'POST' , 'DELETE' ] , allowed_origin = [ '*' ] , allowed_header = [ 'Content-Disposition' , 'Content-Type' , 'x-amz-meta-authorized-length' , 'x-amz-acl' , 'x-amz-meta-uploader-ip' , 'x-amz-meta-uploader-id' ] , expose_header = [ 'ETag' ] , max_age_seconds = 3000 ) #NEWLINE# bucket . set_cors ( cors )