Class CorsPolicy (1.0.0)

public sealed class CorsPolicy : IMessage<CorsPolicy>, IEquatable<CorsPolicy>, IDeepCloneable<CorsPolicy>, IBufferMessage, IMessage

The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing

Inheritance

Object > CorsPolicy

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Constructors

CorsPolicy()

public CorsPolicy()

CorsPolicy(CorsPolicy)

public CorsPolicy(CorsPolicy other)
Parameter
NameDescription
otherCorsPolicy

Properties

AllowCredentials

public bool AllowCredentials { get; set; }

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 is false.

Property Value
TypeDescription
Boolean

AllowHeaders

public RepeatedField<string> AllowHeaders { get; }

Specifies the content for the Access-Control-Allow-Headers header.

Property Value
TypeDescription
RepeatedField<String>

AllowMethods

public RepeatedField<string> AllowMethods { get; }

Specifies the content for the Access-Control-Allow-Methods header.

Property Value
TypeDescription
RepeatedField<String>

AllowOriginRegexes

public RepeatedField<string> AllowOriginRegexes { get; }

Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see github.com/google/re2/wiki/Syntax An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.

Property Value
TypeDescription
RepeatedField<String>

AllowOrigins

public RepeatedField<string> AllowOrigins { get; }

Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.

Property Value
TypeDescription
RepeatedField<String>

Disabled

public bool Disabled { get; set; }

If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.

Property Value
TypeDescription
Boolean

ExposeHeaders

public RepeatedField<string> ExposeHeaders { get; }

Specifies the content for the Access-Control-Expose-Headers header.

Property Value
TypeDescription
RepeatedField<String>

HasAllowCredentials

public bool HasAllowCredentials { get; }

Gets whether the "allow_credentials" field is set

Property Value
TypeDescription
Boolean

HasDisabled

public bool HasDisabled { get; }

Gets whether the "disabled" field is set

Property Value
TypeDescription
Boolean

HasMaxAge

public bool HasMaxAge { get; }

Gets whether the "max_age" field is set

Property Value
TypeDescription
Boolean

MaxAge

public int MaxAge { get; set; }

Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.

Property Value
TypeDescription
Int32