CorsPolicy Class

The CORS policy for the Cosmos DB database account.

All required parameters must be populated in order to send to server.

Inheritance
azure.mgmt.cosmosdb._serialization.Model
CorsPolicy

Constructor

CorsPolicy(*, allowed_origins: str, allowed_methods: str | None = None, allowed_headers: str | None = None, exposed_headers: str | None = None, max_age_in_seconds: int | None = None, **kwargs: Any)

Keyword-Only Parameters

Name Description
allowed_origins
str

The origin domains that are permitted to make a request against the service via CORS. Required.

allowed_methods
str

The methods (HTTP request verbs) that the origin domain may use for a CORS request.

allowed_headers
str

The request headers that the origin domain may specify on the CORS request.

exposed_headers
str

The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.

max_age_in_seconds
int

The maximum amount time that a browser should cache the preflight OPTIONS request.

Variables

Name Description
allowed_origins
str

The origin domains that are permitted to make a request against the service via CORS. Required.

allowed_methods
str

The methods (HTTP request verbs) that the origin domain may use for a CORS request.

allowed_headers
str

The request headers that the origin domain may specify on the CORS request.

exposed_headers
str

The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.

max_age_in_seconds
int

The maximum amount time that a browser should cache the preflight OPTIONS request.