public static final class HttpInboundEndpointSupportSpec.CrossOriginSpec extends Object
CrossOrigin
.Modifier and Type | Method and Description |
---|---|
HttpInboundEndpointSupportSpec.CrossOriginSpec |
allowCredentials(Boolean allowCredentials)
Whether the browser should include any cookies associated with the
domain of the request being annotated.
|
HttpInboundEndpointSupportSpec.CrossOriginSpec |
allowedHeaders(String... allowedHeaders)
List of request headers that can be used during the actual request.
|
HttpInboundEndpointSupportSpec.CrossOriginSpec |
exposedHeaders(String... exposedHeaders)
List of response headers that the user-agent will allow the client to access.
|
HttpInboundEndpointSupportSpec.CrossOriginSpec |
maxAge(long maxAge)
The maximum age (in seconds) of the cache duration for pre-flight responses.
|
HttpInboundEndpointSupportSpec.CrossOriginSpec |
method(RequestMethod... method)
List of supported HTTP request methods, e.g.
|
HttpInboundEndpointSupportSpec.CrossOriginSpec |
origin(String... origin)
List of allowed origins, e.g.
|
public HttpInboundEndpointSupportSpec.CrossOriginSpec origin(String... origin)
"https://domain1.com"
.
These values are placed in the Access-Control-Allow-Origin
header of both the pre-flight response and the actual response.
"*"
means that all origins are allowed.
If undefined, all origins are allowed.
origin
- the list of allowed origins.public HttpInboundEndpointSupportSpec.CrossOriginSpec allowedHeaders(String... allowedHeaders)
This property controls the value of the pre-flight response's
Access-Control-Allow-Headers
header.
"*"
means that all headers requested by the client are allowed.
allowedHeaders
- the list of request headers.public HttpInboundEndpointSupportSpec.CrossOriginSpec exposedHeaders(String... exposedHeaders)
This property controls the value of actual response's
Access-Control-Expose-Headers
header.
exposedHeaders
- the list of response headers.public HttpInboundEndpointSupportSpec.CrossOriginSpec method(RequestMethod... method)
"{RequestMethod.GET, RequestMethod.POST}"
.
Methods specified here override those specified via RequestMapping
.
method
- the list of supported HTTP request methodspublic HttpInboundEndpointSupportSpec.CrossOriginSpec allowCredentials(Boolean allowCredentials)
Set to "false"
if such cookies should not included.
allowCredentials
- the boolean
flag to include
Access-Control-Allow-Credentials=true
in pre-flight response or notpublic HttpInboundEndpointSupportSpec.CrossOriginSpec maxAge(long maxAge)
This property controls the value of the Access-Control-Max-Age
header in the pre-flight response.
maxAge
- the maximum age (in seconds) of the cache duration for pre-flight responses.