java.lang.Object
io.helidon.cors.CrossOriginConfig
Deprecated, for removal: This API element is subject to removal in a future version.
Represents information about cross origin request sharing.
Applications can obtain a new instance in three ways:
- Use a
Builderexplicitly.Obtain a suitable builder by:
- getting a new builder using the static
builder()method, - initializing a builder from an existing
CrossOriginConfiginstance using the staticbuilder(CrossOriginConfig)method, or - initializing a builder from a
Confignode, invokingConfig.as(io.helidon.common.GenericType<T>)usingcorsConfig.as(CrossOriginConfig::builder).get()
buildmethod to create the instance. - getting a new builder using the static
- Invoke the static
create(Config)method, passing a config node containing the cross-origin information to be converted. This is a convenience method equivalent to creating a builder using the config node and then invokingbuild(). - Invoke the static
create()method which returns aCrossOriginConfiginstance which implements the default CORS behavior.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version.Builder forCrossOriginConfig. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Allow-Credentials.static final StringDeprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Allow-Headers.static final StringDeprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Allow-Methods.static final StringDeprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Allow-Origin.static final StringDeprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Expose-Headers.static final StringDeprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Max-Age.static final StringDeprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Request-Headers.static final StringDeprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Request-Method.static final StringDeprecated, for removal: This API element is subject to removal in a future version.Key for the node within the CORS config that contains the list of path information.static final longDeprecated, for removal: This API element is subject to removal in a future version.Default cache expiration in seconds. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated, for removal: This API element is subject to removal in a future version.String[]Deprecated, for removal: This API element is subject to removal in a future version.String[]Deprecated, for removal: This API element is subject to removal in a future version.String[]Deprecated, for removal: This API element is subject to removal in a future version.static CrossOriginConfig.Builderbuilder()Deprecated, for removal: This API element is subject to removal in a future version.static CrossOriginConfig.BuilderDeprecated, for removal: This API element is subject to removal in a future version.usebuilder(io.helidon.config.Config)insteadstatic CrossOriginConfig.BuilderDeprecated, for removal: This API element is subject to removal in a future version.Creates a newCrossOriginConfig.Builderusing the provided config node.static CrossOriginConfig.Builderbuilder(CrossOriginConfig original) Deprecated, for removal: This API element is subject to removal in a future version.Initializes a newCrossOriginConfig.Builderfrom the values in an existingCrossOriginConfigobject.static CrossOriginConfigcreate()Deprecated, for removal: This API element is subject to removal in a future version.Creates a newCrossOriginConfiginstance which represents the default CORS behavior.static CrossOriginConfigDeprecated, for removal: This API element is subject to removal in a future version.usecreate(io.helidon.config.Config)insteadstatic CrossOriginConfigDeprecated, for removal: This API element is subject to removal in a future version.Creates a newCrossOriginConfiginstance based on the provided configuration node.String[]Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.Reports whether the specified HTTP method name matches thisCrossOriginConfig.longDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.toString()Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
CORS_PATHS_CONFIG_KEY
Deprecated, for removal: This API element is subject to removal in a future version.Key for the node within the CORS config that contains the list of path information.- See Also:
-
ACCESS_CONTROL_ALLOW_HEADERS
Deprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Allow-Headers.- See Also:
-
ACCESS_CONTROL_ALLOW_METHODS
Deprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Allow-Methods.- See Also:
-
ACCESS_CONTROL_ALLOW_CREDENTIALS
Deprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Allow-Credentials.- See Also:
-
ACCESS_CONTROL_MAX_AGE
Deprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Max-Age.- See Also:
-
ACCESS_CONTROL_EXPOSE_HEADERS
Deprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Expose-Headers.- See Also:
-
ACCESS_CONTROL_ALLOW_ORIGIN
Deprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Allow-Origin.- See Also:
-
ACCESS_CONTROL_REQUEST_HEADERS
Deprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Request-Headers.- See Also:
-
ACCESS_CONTROL_REQUEST_METHOD
Deprecated, for removal: This API element is subject to removal in a future version.Header Access-Control-Request-Method.- See Also:
-
DEFAULT_AGE
public static final long DEFAULT_AGEDeprecated, for removal: This API element is subject to removal in a future version.Default cache expiration in seconds.- See Also:
-
-
Method Details
-
builder
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- a new builder for basic cross origin config
-
builder
@Deprecated(since="4.4.0", forRemoval=true) public static CrossOriginConfig.Builder builder(Config config) Deprecated, for removal: This API element is subject to removal in a future version.usebuilder(io.helidon.config.Config)insteadCreates a newCrossOriginConfig.Builderusing the provided config node.- Parameters:
config- node containing cross-origin information- Returns:
- new
CrossOriginConfig.Builderinstance based on the configuration
-
builder
Deprecated, for removal: This API element is subject to removal in a future version.Creates a newCrossOriginConfig.Builderusing the provided config node.Although this method is equivalent to
builder().config(config)it conveniently combines those two steps for use as a method reference.- Parameters:
config- node containing cross-origin information- Returns:
- new
CrossOriginConfig.Builderinstance based on the configuration
-
builder
Deprecated, for removal: This API element is subject to removal in a future version.Initializes a newCrossOriginConfig.Builderfrom the values in an existingCrossOriginConfigobject.- Parameters:
original- the existing cross-origin config object- Returns:
- new Builder initialized from the existing object's settings
-
create
Deprecated, for removal: This API element is subject to removal in a future version.Creates a newCrossOriginConfiginstance which represents the default CORS behavior.- Returns:
- new default
CrossOriginConfiginstance
-
create
Deprecated, for removal: This API element is subject to removal in a future version.usecreate(io.helidon.config.Config)insteadCreates a newCrossOriginConfiginstance based on the provided configuration node.- Parameters:
config- node containing CORS information- Returns:
- new
CrossOriginConfigbased on the configuration
-
create
Deprecated, for removal: This API element is subject to removal in a future version.Creates a newCrossOriginConfiginstance based on the provided configuration node.- Parameters:
corsConfig- node containing CORS information- Returns:
- new
CrossOriginConfigbased on the configuration
-
pathPattern
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- the configured path expression; defaults to a "match-everything" pattern
-
isEnabled
public boolean isEnabled()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- whether this cross-origin config is enabled
-
allowOrigins
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- the allowed origins
-
allowHeaders
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- the allowed headers
-
exposeHeaders
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- headers OK to expose in responses
-
allowMethods
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- allowed methods
-
allowCredentials
public boolean allowCredentials()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- allowed credentials
-
maxAgeSeconds
public long maxAgeSeconds()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- maximum age
-
matches
Deprecated, for removal: This API element is subject to removal in a future version.Reports whether the specified HTTP method name matches thisCrossOriginConfig.- Parameters:
method- HTTP method name to check- Returns:
- true if this
CrossOriginConfigmatches the specified method; false otherwise
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.
-
helidon-webserver-corswithio.helidon.webserver.cors.CorsFeatureeither fromServiceRegistry, or through one of the feature's static factory or builder methods; paths configured in config are registered first, before paths configured through service registry; this class will be removed in a future version of Helidon