Module io.helidon.microprofile.cors
Package io.helidon.microprofile.cors
Helidon MP CORS Support
Adding the Helidon MP CORS module to your application enables CORS support automatically, implementing the configuration in the "cors" section of your MicroProfile configuration.
Many MP developers will use the CrossOrigin
annotation on the endpoint implementations in
their code to set up the CORS behavior, but any values in configuration will override the annotations or set up CORS for
endpoints without the annotation.
Here is an example of the configuration format:
cors: enabled: true # this is the default paths: - path-pattern: /cors1 allow-origins: ["*"] allow-methods: ["*"] - path-pattern: /cors2 allow-origins: ["http://foo.bar", "http://bar.foo"] allow-methods: ["DELETE", "PUT"] allow-headers: ["X-bar", "X-foo"] allow-credentials: true max-age: -1
-
Class Summary Class Description CorsCdiExtension CDI extension for processing CORS-annotated types.CrossOriginAutoDiscoverable Not for use by developers. For Jersey auto-discovery support. -
Annotation Types Summary Annotation Type Description CrossOrigin CrossOrigin annotation.