Class CorsElement
Represents a configuration element providing Cross-Origin Resource Sharing protocol settings.
Inheritance
Namespace: Nevatech.Vsb.Repository.Configuration
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class CorsElement : ConfigurationElement
Constructors
CorsElement()
Declaration
public CorsElement()
Properties
AllowCredentials
Gets or sets the flag indicating whether the resource supports user credentials in the request. It is true when the resource does and false otherwise.
Declaration
public bool AllowCredentials { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AllowedHeaders
Gets or sets the list of HTTP headers consisting of zero or more header field names that are supported by the resource. A wildcard (*) can be used to allow all headers.
Declaration
public string AllowedHeaders { get; set; }
Property Value
Type | Description |
---|---|
System.String |
AllowedMethods
Gets or sets the list of methods consisting of one or more HTTP methods that are supported by the resource. A wildcard (*) can be used to allow all methods. If property is Null or empty then CORS preflight requests are not supported.
Declaration
public string AllowedMethods { get; set; }
Property Value
Type | Description |
---|---|
System.String |
AllowedOrigins
Gets or sets the list of origins consisting of one or more URIs that are allowed access to the resource. A wildcard (*) can be used to allow access to all origins.
Declaration
public string AllowedOrigins { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ExposedHeaders
Gets or sets the list of exposed headers consisting of zero or more header field names of headers that the resource might use and can be exposed.
Declaration
public string ExposedHeaders { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Prefix
Gets or sets the beginning of the request URI path that must be matched in order for this CORS configuration to become effective.
Declaration
public string Prefix { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PreflightMaxAge
Gets or sets the number of secords indicating how long the results of a preflight request can be cached on a client in a preflight result cache. Value must be positive.
Declaration
public int PreflightMaxAge { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Properties
Gets collection of configuration element properties.
Declaration
protected override ConfigurationPropertyCollection Properties { get; }
Property Value
Type | Description |
---|---|
System.Configuration.ConfigurationPropertyCollection |