Interface CorsPolicyOrBuilder (1.14.0)

public interface CorsPolicyOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getAllowCredentials()

public abstract boolean getAllowCredentials()

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.

optional bool allow_credentials = 481263366;

Returns
TypeDescription
boolean

The allowCredentials.

getAllowHeaders(int index)

public abstract String getAllowHeaders(int index)

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

repeated string allow_headers = 45179024;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The allowHeaders at the given index.

getAllowHeadersBytes(int index)

public abstract ByteString getAllowHeadersBytes(int index)

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

repeated string allow_headers = 45179024;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the allowHeaders at the given index.

getAllowHeadersCount()

public abstract int getAllowHeadersCount()

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

repeated string allow_headers = 45179024;

Returns
TypeDescription
int

The count of allowHeaders.

getAllowHeadersList()

public abstract List<String> getAllowHeadersList()

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

repeated string allow_headers = 45179024;

Returns
TypeDescription
List<String>

A list containing the allowHeaders.

getAllowMethods(int index)

public abstract String getAllowMethods(int index)

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

repeated string allow_methods = 205405372;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The allowMethods at the given index.

getAllowMethodsBytes(int index)

public abstract ByteString getAllowMethodsBytes(int index)

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

repeated string allow_methods = 205405372;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the allowMethods at the given index.

getAllowMethodsCount()

public abstract int getAllowMethodsCount()

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

repeated string allow_methods = 205405372;

Returns
TypeDescription
int

The count of allowMethods.

getAllowMethodsList()

public abstract List<String> getAllowMethodsList()

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

repeated string allow_methods = 205405372;

Returns
TypeDescription
List<String>

A list containing the allowMethods.

getAllowOriginRegexes(int index)

public abstract String getAllowOriginRegexes(int index)

Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.

repeated string allow_origin_regexes = 215385810;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The allowOriginRegexes at the given index.

getAllowOriginRegexesBytes(int index)

public abstract ByteString getAllowOriginRegexesBytes(int index)

Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.

repeated string allow_origin_regexes = 215385810;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the allowOriginRegexes at the given index.

getAllowOriginRegexesCount()

public abstract int getAllowOriginRegexesCount()

Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.

repeated string allow_origin_regexes = 215385810;

Returns
TypeDescription
int

The count of allowOriginRegexes.

getAllowOriginRegexesList()

public abstract List<String> getAllowOriginRegexesList()

Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.

repeated string allow_origin_regexes = 215385810;

Returns
TypeDescription
List<String>

A list containing the allowOriginRegexes.

getAllowOrigins(int index)

public abstract String getAllowOrigins(int index)

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.

repeated string allow_origins = 194914071;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The allowOrigins at the given index.

getAllowOriginsBytes(int index)

public abstract ByteString getAllowOriginsBytes(int index)

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.

repeated string allow_origins = 194914071;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the allowOrigins at the given index.

getAllowOriginsCount()

public abstract int getAllowOriginsCount()

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.

repeated string allow_origins = 194914071;

Returns
TypeDescription
int

The count of allowOrigins.

getAllowOriginsList()

public abstract List<String> getAllowOriginsList()

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.

repeated string allow_origins = 194914071;

Returns
TypeDescription
List<String>

A list containing the allowOrigins.

getDisabled()

public abstract boolean getDisabled()

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

optional bool disabled = 270940796;

Returns
TypeDescription
boolean

The disabled.

getExposeHeaders(int index)

public abstract String getExposeHeaders(int index)

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

repeated string expose_headers = 247604747;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The exposeHeaders at the given index.

getExposeHeadersBytes(int index)

public abstract ByteString getExposeHeadersBytes(int index)

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

repeated string expose_headers = 247604747;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the exposeHeaders at the given index.

getExposeHeadersCount()

public abstract int getExposeHeadersCount()

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

repeated string expose_headers = 247604747;

Returns
TypeDescription
int

The count of exposeHeaders.

getExposeHeadersList()

public abstract List<String> getExposeHeadersList()

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

repeated string expose_headers = 247604747;

Returns
TypeDescription
List<String>

A list containing the exposeHeaders.

getMaxAge()

public abstract int getMaxAge()

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

optional int32 max_age = 307559332;

Returns
TypeDescription
int

The maxAge.

hasAllowCredentials()

public abstract boolean hasAllowCredentials()

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.

optional bool allow_credentials = 481263366;

Returns
TypeDescription
boolean

Whether the allowCredentials field is set.

hasDisabled()

public abstract boolean hasDisabled()

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

optional bool disabled = 270940796;

Returns
TypeDescription
boolean

Whether the disabled field is set.

hasMaxAge()

public abstract boolean hasMaxAge()

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

optional int32 max_age = 307559332;

Returns
TypeDescription
boolean

Whether the maxAge field is set.