- java.lang.Object
-
- io.helidon.webserver.cors.CrossOriginConfig.Builder
-
- All Implemented Interfaces:
Builder<CrossOriginConfig>
,Supplier<CrossOriginConfig>
- Enclosing class:
- CrossOriginConfig
public static class CrossOriginConfig.Builder extends Object implements Builder<CrossOriginConfig>
Builder forCrossOriginConfig
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CrossOriginConfig.Builder
allowCredentials(boolean allowCredentials)
CrossOriginConfig.Builder
allowHeaders(String... allowHeaders)
CrossOriginConfig.Builder
allowMethods(String... allowMethods)
CrossOriginConfig.Builder
allowOrigins(String... origins)
CrossOriginConfig
build()
Build the instance from this builder.CrossOriginConfig.Builder
config(Config corsConfig)
Augment or override existing settings using the providedConfig
node.CrossOriginConfig.Builder
enabled(boolean enabled)
CrossOriginConfig.Builder
exposeHeaders(String... exposeHeaders)
CrossOriginConfig.Builder
maxAgeSeconds(long maxAgeSeconds)
CrossOriginConfig.Builder
pathPattern(String pathPattern)
Updates the path prefix for this cross-origin config.String
toString()
-
-
-
Method Detail
-
pathPattern
public CrossOriginConfig.Builder pathPattern(String pathPattern)
Updates the path prefix for this cross-origin config.- Parameters:
pathPattern
- new path prefix- Returns:
- updated builder
-
enabled
public CrossOriginConfig.Builder enabled(boolean enabled)
-
allowOrigins
public CrossOriginConfig.Builder allowOrigins(String... origins)
-
allowHeaders
public CrossOriginConfig.Builder allowHeaders(String... allowHeaders)
-
exposeHeaders
public CrossOriginConfig.Builder exposeHeaders(String... exposeHeaders)
-
allowMethods
public CrossOriginConfig.Builder allowMethods(String... allowMethods)
-
allowCredentials
public CrossOriginConfig.Builder allowCredentials(boolean allowCredentials)
-
maxAgeSeconds
public CrossOriginConfig.Builder maxAgeSeconds(long maxAgeSeconds)
-
config
public CrossOriginConfig.Builder config(Config corsConfig)
Augment or override existing settings using the providedConfig
node.- Parameters:
corsConfig
- config node containing CORS information- Returns:
- updated builder
-
build
public CrossOriginConfig build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<CrossOriginConfig>
- Returns:
- instance of the built type
-
-