java.lang.Object
io.helidon.webserver.cors.CorsFeature
- All Implemented Interfaces:
RuntimeType.Api<CorsConfig>,io.helidon.common.config.NamedService,ServerFeature
Adds CORS support to Helidon WebServer.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webserver.spi.ServerFeature
ServerFeature.RoutingBuilders, ServerFeature.ServerFeatureContext, ServerFeature.SocketBuilders -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic CorsConfig.Builderbuilder()Fluent API builder to set up an instance.static CorsFeaturecreate()Create a new CORS feature with default setup.static CorsFeaturecreate(io.helidon.common.config.Config config) Create a new CORS feature with custom setup.static CorsFeaturecreate(CorsConfig config) Create a new instance from its configuration.static CorsFeaturecreate(Consumer<CorsConfig.Builder> builderConsumer) Create a new instance customizing its configuration.name()voidsetup(ServerFeature.ServerFeatureContext featureContext) type()
-
Field Details
-
WEIGHT
public static final double WEIGHTDefault weight of the feature.- See Also:
-
-
Method Details
-
builder
Fluent API builder to set up an instance.- Returns:
- a new builder
-
create
Create a new instance from its configuration.- Parameters:
config- configuration- Returns:
- a new feature
-
create
Create a new instance customizing its configuration.- Parameters:
builderConsumer- consumer of configuration- Returns:
- a new feature
-
create
Create a new CORS feature with default setup.- Returns:
- a new feature
-
create
Create a new CORS feature with custom setup.- Parameters:
config- configuration- Returns:
- a new configured feature
-
setup
- Specified by:
setupin interfaceServerFeature
-
name
- Specified by:
namein interfaceio.helidon.common.config.NamedService
-
type
- Specified by:
typein interfaceio.helidon.common.config.NamedService
-
prototype
- Specified by:
prototypein interfaceRuntimeType.Api<CorsConfig>
-