java.lang.Object
io.helidon.cors.CrossOriginConfig.Builder
- All Implemented Interfaces:
Builder<CrossOriginConfig.Builder,
,CrossOriginConfig> CorsSetter<CrossOriginConfig.Builder>
,Supplier<CrossOriginConfig>
- Enclosing class:
CrossOriginConfig
public static class CrossOriginConfig.Builder
extends Object
implements CorsSetter<CrossOriginConfig.Builder>, Builder<CrossOriginConfig.Builder,CrossOriginConfig>
Builder for
CrossOriginConfig
.-
Method Summary
Modifier and TypeMethodDescriptionallowCredentials
(boolean allowCredentials) Sets the allow credentials flag.allowHeaders
(String... allowHeaders) Sets the allow headers.allowMethods
(String... allowMethods) Sets the allow methods.allowOrigins
(String... origins) Sets the allowOrigins.build()
Build the instance from this builder.Augment or override existing settings using the providedConfig
node.enabled
(boolean enabled) Sets whether this config should be enabled or not.exposeHeaders
(String... exposeHeaders) Sets the expose headers.maxAgeSeconds
(long maxAgeSeconds) Sets the maximum age.pathPattern
(String pathPattern) Updates the path prefix for this cross-origin config.toString()
-
Method Details
-
pathPattern
Updates the path prefix for this cross-origin config.- Parameters:
pathPattern
- new path prefix- Returns:
- updated builder
-
enabled
Description copied from interface:CorsSetter
Sets whether this config should be enabled or not.- Specified by:
enabled
in interfaceCorsSetter<CrossOriginConfig.Builder>
- Parameters:
enabled
- true for this config to have effect; false for it to be ignored- Returns:
- updated setter
-
allowOrigins
Description copied from interface:CorsSetter
Sets the allowOrigins.- Specified by:
allowOrigins
in interfaceCorsSetter<CrossOriginConfig.Builder>
- Parameters:
origins
- the origin value(s)- Returns:
- updated setter
-
allowHeaders
Description copied from interface:CorsSetter
Sets the allow headers.- Specified by:
allowHeaders
in interfaceCorsSetter<CrossOriginConfig.Builder>
- Parameters:
allowHeaders
- the allow headers value(s)- Returns:
- updated setter
-
exposeHeaders
Description copied from interface:CorsSetter
Sets the expose headers.- Specified by:
exposeHeaders
in interfaceCorsSetter<CrossOriginConfig.Builder>
- Parameters:
exposeHeaders
- the expose headers value(s)- Returns:
- updated setter
-
allowMethods
Description copied from interface:CorsSetter
Sets the allow methods.- Specified by:
allowMethods
in interfaceCorsSetter<CrossOriginConfig.Builder>
- Parameters:
allowMethods
- the allow method value(s)- Returns:
- updated setter
-
allowCredentials
Description copied from interface:CorsSetter
Sets the allow credentials flag.- Specified by:
allowCredentials
in interfaceCorsSetter<CrossOriginConfig.Builder>
- Parameters:
allowCredentials
- the allow credentials flag- Returns:
- updated setter
-
maxAgeSeconds
Description copied from interface:CorsSetter
Sets the maximum age.- Specified by:
maxAgeSeconds
in interfaceCorsSetter<CrossOriginConfig.Builder>
- Parameters:
maxAgeSeconds
- the maximum age- Returns:
- updated setter
-
config
Augment or override existing settings using the providedConfig
node.- Parameters:
corsConfig
- config node containing CORS information- Returns:
- updated builder
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<CrossOriginConfig.Builder,
CrossOriginConfig> - Returns:
- instance of the built type
-
toString
-