public sealed class CorsPolicy : IMessage<CorsPolicy>, IEquatable<CorsPolicy>, IDeepCloneable<CorsPolicy>, IBufferMessage, IMessageThe specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing
Implements
IMessage<CorsPolicy>, IEquatable<CorsPolicy>, IDeepCloneable<CorsPolicy>, IBufferMessage, IMessageNamespace
Google.Cloud.Compute.V1Assembly
Google.Cloud.Compute.V1.dll
Constructors
CorsPolicy()
public CorsPolicy()CorsPolicy(CorsPolicy)
public CorsPolicy(CorsPolicy other)| Parameter | |
|---|---|
| Name | Description |
other |
CorsPolicy |
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 | |
|---|---|
| Type | Description |
Boolean |
|
AllowHeaders
public RepeatedField<string> AllowHeaders { get; }Specifies the content for the Access-Control-Allow-Headers header.
| Property Value | |
|---|---|
| Type | Description |
RepeatedField<String> |
|
AllowMethods
public RepeatedField<string> AllowMethods { get; }Specifies the content for the Access-Control-Allow-Methods header.
| Property Value | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
Boolean |
|
ExposeHeaders
public RepeatedField<string> ExposeHeaders { get; }Specifies the content for the Access-Control-Expose-Headers header.
| Property Value | |
|---|---|
| Type | Description |
RepeatedField<String> |
|
HasAllowCredentials
public bool HasAllowCredentials { get; }Gets whether the "allow_credentials" field is set
| Property Value | |
|---|---|
| Type | Description |
Boolean |
|
HasDisabled
public bool HasDisabled { get; }Gets whether the "disabled" field is set
| Property Value | |
|---|---|
| Type | Description |
Boolean |
|
HasMaxAge
public bool HasMaxAge { get; }Gets whether the "max_age" field is set
| Property Value | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
Int32 |
|