Module io.helidon.microprofile.cors
Package io.helidon.microprofile.cors
Annotation Interface CrossOrigin
@Target(METHOD)
@Retention(RUNTIME)
@Documented
@Deprecated(forRemoval=true,
since="4.4.0")
public @interface CrossOrigin
Deprecated, for removal: This API element is subject to removal in a future version.
CrossOrigin annotation.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanDeprecated, for removal: This API element is subject to removal in a future version.Whether the client can send cookies or credentials.String[]Deprecated, for removal: This API element is subject to removal in a future version.A list of request headers that are allowed or"*"to allow all headers.String[]Deprecated, for removal: This API element is subject to removal in a future version.A list of supported HTTP request methods.String[]Deprecated, for removal: This API element is subject to removal in a future version.A list of response headers allowed for clients other than the "standard" ones.longDeprecated, for removal: This API element is subject to removal in a future version.Pre-flight response duration in seconds.String[]Deprecated, for removal: This API element is subject to removal in a future version.A list of origins that are allowed such as"http://foo.com"or"*"to allow all origins.
-
Element Details
-
value
String[] valueDeprecated, for removal: This API element is subject to removal in a future version.A 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[] allowHeadersDeprecated, for removal: This API element is subject to removal in a future version.A list of request headers that are allowed or"*"to allow all headers. Corresponds toAccess-Control-Allow-Headers.- Returns:
- Allowed headers.
- Default:
{"*"}
-
exposeHeaders
String[] exposeHeadersDeprecated, for removal: This API element is subject to removal in a future version.A list of response headers allowed for clients other than the "standard" ones. Corresponds toAccess-Control-Expose-Headers.- Returns:
- Exposed headers.
- Default:
{}
-
allowMethods
String[] allowMethodsDeprecated, for removal: This API element is subject to removal in a future version.A list of supported HTTP request methods. In response to pre-flight requests. Corresponds toAccess-Control-Allow-Methods.- Returns:
- Allowed methods.
- Default:
{"*"}
-
allowCredentials
boolean allowCredentialsDeprecated, for removal: This API element is subject to removal in a future version.Whether the client can send cookies or credentials. Corresponds toAccess-Control-Allow-Credentials.- Returns:
- Allowed credentials.
- Default:
false
-
maxAge
long maxAgeDeprecated, for removal: This API element is subject to removal in a future version.Pre-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
-
Corsto configure CORS; each method in this annotation is equivalent to an annotation class in the referenced class. I.e.value()is replaced withCors.AllowOrigins; this class will be removed from a future version of Helidon.