@Target(value={METHOD,TYPE}) @Retention(value=RUNTIME) @Documented public @interface CrossOrigin
| Modifier and Type | Optional Element and Description |
|---|---|
String |
allowCredentials
Set to
"true" if the the browser should include any cookies associated to the domain
of the request being annotated, or "false" if it should not. |
String[] |
allowedHeaders
Indicates which request headers can be used during the actual request.
|
String[] |
exposedHeaders
List of response headers that the user-agent will allow the client to access.
|
long |
maxAge
Controls the cache duration for pre-flight responses.
|
RequestMethod[] |
method
The HTTP request methods to allow: GET, POST, HEAD, OPTIONS, PUT, PATCH, DELETE, TRACE.
|
String[] |
origin
List of allowed origins.
|
public abstract String[] origin
"*" means that all origins are allowed. These values
are placed in the Access-Control-Allow-Origin header of both the pre-flight
and actual responses. Default value is "*".public abstract String[] allowedHeaders
"*" means
that all headers asked by the client are allowed. This property controls the value of
pre-flight response's Access-Control-Allow-Headers header. Default value is
"*".public abstract String[] exposedHeaders
Access-Control-Expose-Headers header.public abstract RequestMethod[] method
RequestMapping ones.public abstract String allowCredentials
"true" if the the browser should include any cookies associated to the domain
of the request being annotated, or "false" if it should not. Empty string "" means undefined.
If true, the pre-flight response will include the header
Access-Control-Allow-Credentials=true. Default value is "true".public abstract long maxAge
Access-Control-Max-Age header
in the pre-flight response. Value set to -1 means undefined. Default value is
1800 seconds, or 30 minutes.