Share via


CorsPolicy Class

Definition

The CORS policy for the Cosmos DB database account.

public class CorsPolicy
type CorsPolicy = class
Public Class CorsPolicy
Inheritance
CorsPolicy

Constructors

CorsPolicy()

Initializes a new instance of the CorsPolicy class.

CorsPolicy(String, String, String, String, Nullable<Int64>)

Initializes a new instance of the CorsPolicy class.

Properties

AllowedHeaders

Gets or sets the request headers that the origin domain may specify on the CORS request.

AllowedMethods

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

AllowedOrigins

Gets or sets the origin domains that are permitted to make a request against the service via CORS.

ExposedHeaders

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

MaxAgeInSeconds

Gets or sets the maximum amount time that a browser should cache the preflight OPTIONS request.

Methods

Validate()

Validate the object.

Applies to