Module io.helidon.microprofile.cors
Package io.helidon.microprofile.cors
Annotation Interface CrossOrigin
CrossOrigin annotation.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether the client can send cookies or credentials.String[]A list of request headers that are allowed or"*"to allow all headers.String[]A list of supported HTTP request methods.String[]A list of response headers allowed for clients other than the "standard" ones.longPre-flight response duration in seconds.String[]A list of origins that are allowed such as"http://foo.com"or"*"to allow all origins.
-
Element Details
-
value
String[] valueA list of origins that are allowed such as"http://foo.com"or"*"to allow all origins. Corresponds to headerAccess-Control-Allow-Origin.- Returns:
- Allowed origins.
- Default:
{"*"}
-
allowHeaders
String[] allowHeadersA list of request headers that are allowed or"*"to allow all headers. Corresponds toAccess-Control-Allow-Headers.- Returns:
- Allowed headers.
- Default:
{"*"}
-
exposeHeaders
String[] exposeHeadersA list of response headers allowed for clients other than the "standard" ones. Corresponds toAccess-Control-Expose-Headers.- Returns:
- Exposed headers.
- Default:
{}
-
allowMethods
String[] allowMethodsA list of supported HTTP request methods. In response to pre-flight requests. Corresponds toAccess-Control-Allow-Methods.- Returns:
- Allowed methods.
- Default:
{"*"}
-
allowCredentials
boolean allowCredentialsWhether the client can send cookies or credentials. Corresponds toAccess-Control-Allow-Credentials.- Returns:
- Allowed credentials.
- Default:
false
-
maxAge
long maxAgePre-flight response duration in seconds. After time expires, a new pre-flight request is required. Corresponds toAccess-Control-Max-Age.- Returns:
- Max age.
- Default:
3600L
-