Class HttpRouteCorsPolicy
The Specification for allowing client side cross-origin requests.
Implements
Inherited Members
Namespace: Google.Apis.NetworkServices.v1.Data
Assembly: Google.Apis.NetworkServices.v1.dll
Syntax
public class HttpRouteCorsPolicy : IDirectResponseSchema
Properties
AllowCredentials
In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. Default value is false.
Declaration
[JsonProperty("allowCredentials")]
public virtual bool? AllowCredentials { get; set; }
Property Value
Type | Description |
---|---|
bool? |
AllowHeaders
Specifies the content for Access-Control-Allow-Headers header.
Declaration
[JsonProperty("allowHeaders")]
public virtual IList<string> AllowHeaders { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
AllowMethods
Specifies the content for Access-Control-Allow-Methods header.
Declaration
[JsonProperty("allowMethods")]
public virtual IList<string> AllowMethods { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
AllowOriginRegexes
Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.
Declaration
[JsonProperty("allowOriginRegexes")]
public virtual IList<string> AllowOriginRegexes { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
AllowOrigins
Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.
Declaration
[JsonProperty("allowOrigins")]
public virtual IList<string> AllowOrigins { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
Disabled
If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
Declaration
[JsonProperty("disabled")]
public virtual bool? Disabled { get; set; }
Property Value
Type | Description |
---|---|
bool? |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
Type | Description |
---|---|
string |
ExposeHeaders
Specifies the content for Access-Control-Expose-Headers header.
Declaration
[JsonProperty("exposeHeaders")]
public virtual IList<string> ExposeHeaders { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
MaxAge
Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
Declaration
[JsonProperty("maxAge")]
public virtual string MaxAge { get; set; }
Property Value
Type | Description |
---|---|
string |