Class CorsPolicy
The specification for allowing client-side cross-origin requests. For more information about the W3C recommendation for cross-origin resource sharing (CORS), see Fetch API Living Standard.
Implements
Inherited Members
Namespace: Google.Apis.Compute.alpha.Data
Assembly: Google.Apis.Compute.alpha.dll
Syntax
public class CorsPolicy : IDirectResponseSchema
Properties
AllowCredentials
In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false.
Declaration
[JsonProperty("allowCredentials")]
public virtual bool? AllowCredentials { get; set; }
Property Value
Type | Description |
---|---|
bool? |
AllowHeaders
Specifies the content for the 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 the Access-Control-Allow-Methods header.
Declaration
[JsonProperty("allowMethods")]
public virtual IList<string> AllowMethods { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
AllowOriginRegexes
Specifies a regular expression that matches allowed origins. For more information, see regular expression syntax . An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
Declaration
[JsonProperty("allowOriginRegexes")]
public virtual IList<string> AllowOriginRegexes { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
AllowOrigins
Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
Declaration
[JsonProperty("allowOrigins")]
public virtual IList<string> AllowOrigins { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
Disabled
If true, disables the CORS policy. 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 the 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 results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.
Declaration
[JsonProperty("maxAge")]
public virtual int? MaxAge { get; set; }
Property Value
Type | Description |
---|---|
int? |