Network Services v1 API - Class HttpRoute.Types.CorsPolicy (1.0.0)

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

Reference documentation and code samples for the Network Services v1 API class HttpRoute.Types.CorsPolicy.

The Specification for allowing client side cross-origin requests.

Inheritance

object > HttpRoute.Types.CorsPolicy

Namespace

Google.Cloud.NetworkServices.V1

Assembly

Google.Cloud.NetworkServices.V1.dll

Constructors

CorsPolicy()

public CorsPolicy()

CorsPolicy(CorsPolicy)

public CorsPolicy(HttpRoute.Types.CorsPolicy other)
Parameter
Name Description
other HttpRouteTypesCorsPolicy

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

Property Value
Type Description
bool

AllowHeaders

public RepeatedField<string> AllowHeaders { get; }

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

Property Value
Type Description
RepeatedFieldstring

AllowMethods

public RepeatedField<string> AllowMethods { get; }

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

Property Value
Type Description
RepeatedFieldstring

AllowOriginRegexes

public RepeatedField<string> AllowOriginRegexes { get; }

Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.

Property Value
Type Description
RepeatedFieldstring

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 allow_origins or an item in allow_origin_regexes.

Property Value
Type Description
RepeatedFieldstring

Disabled

public bool Disabled { get; set; }

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

Property Value
Type Description
bool

ExposeHeaders

public RepeatedField<string> ExposeHeaders { get; }

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

Property Value
Type Description
RepeatedFieldstring

MaxAge

public string MaxAge { get; set; }

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

Property Value
Type Description
string