Package 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:

     enabled: true # this is the default
       - path-pattern: /cors1
         allow-origins: ["*"]
         allow-methods: ["*"]
       - path-pattern: /cors2
         allow-origins: ["", ""]
         allow-methods: ["DELETE", "PUT"]
         allow-headers: ["X-bar", "X-foo"]
         allow-credentials: true
         max-age: -1