Query CORS rules

更新时间:
复制 MD 格式

Retrieves the cross-origin resource sharing (CORS) configuration of a bucket.

Syntax

ossutil api get-bucket-cors --bucket <value> [flags]

Parameters

ParameterTypeRequiredDescription
--bucketstringYesThe name of the bucket.

For all supported flags, see Command-line options.

Examples

Query the CORS configuration of a bucket:

ossutil api get-bucket-cors --bucket examplebucket

Query the CORS configuration and display the output in JSON format:

ossutil api get-bucket-cors --bucket examplebucket --output-format json