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.ModelCorsPolicy
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
|
The origin domains that are permitted to make a request against the service via CORS. Required. |
allowed_methods
|
The methods (HTTP request verbs) that the origin domain may use for a CORS request. |
allowed_headers
|
The request headers that the origin domain may specify on the CORS request. |
exposed_headers
|
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
|
The maximum amount time that a browser should cache the preflight OPTIONS request. |
Variables
Name | Description |
---|---|
allowed_origins
|
The origin domains that are permitted to make a request against the service via CORS. Required. |
allowed_methods
|
The methods (HTTP request verbs) that the origin domain may use for a CORS request. |
allowed_headers
|
The request headers that the origin domain may specify on the CORS request. |
exposed_headers
|
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
|
The maximum amount time that a browser should cache the preflight OPTIONS request. |
Azure SDK for Python
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for