• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (Python SDK)
  4. Data Types
  5. Bucket CORS Rules

Bucket CORS Rules

Namespace

Class

Module

CorsRule

com.obs.models.cors_rule

Parameter Description

Field

Type

Optional or Mandatory

Description

id

str

Optional when used as a request parameter

CORS rule ID. It is a 1-255 character string.

allowedMethod

list of str

Mandatory when used as a request parameter

HTTP methods allowed by the CORS rule. Possible values are:

  • GET
  • PUT
  • HEAD
  • POST
  • DELETE

allowedOrigin

list of str

Mandatory when used as a request parameter

Origins (character strings representing domain names) allowed by the CORS rule. Each allowedOrigin can contain up to one wildcard character (*).

allowedHeader

list of str

Optional when used as a request parameter

Request headers allowed by the CORS rule. Each allowedHeader can contain up to one wildcard character (*).

maxAgeSecond

int

Optional when used as a request parameter

Cache duration (in seconds) of the cross-region request result in the client allowed by the CORS rule. The value must be an integer.

exposeHeader

list of str

Optional when used as a request parameter

Additional response headers allowed by the CORS rule. It cannot contain spaces.