Class HttpInboundEndpointSupportSpec.CrossOriginSpec
java.lang.Object
org.springframework.integration.http.dsl.HttpInboundEndpointSupportSpec.CrossOriginSpec
- Enclosing class:
- HttpInboundEndpointSupportSpec<S extends HttpInboundEndpointSupportSpec<S,E>,E extends BaseHttpInboundEndpoint>
public static final class HttpInboundEndpointSupportSpec.CrossOriginSpec extends Object
A fluent API for the 
CrossOrigin.- 
Method SummaryModifier and Type Method Description HttpInboundEndpointSupportSpec.CrossOriginSpecallowCredentials(Boolean allowCredentials)Whether the browser should include any cookies associated with the domain of the request being annotated.HttpInboundEndpointSupportSpec.CrossOriginSpecallowedHeaders(String... allowedHeaders)List of request headers that can be used during the actual request.HttpInboundEndpointSupportSpec.CrossOriginSpecexposedHeaders(String... exposedHeaders)List of response headers that the user-agent will allow the client to access.HttpInboundEndpointSupportSpec.CrossOriginSpecmaxAge(long maxAge)The maximum age (in seconds) of the cache duration for pre-flight responses.HttpInboundEndpointSupportSpec.CrossOriginSpecmethod(RequestMethod... method)List of supported HTTP request methods, e.g.HttpInboundEndpointSupportSpec.CrossOriginSpecorigin(String... origin)List of allowed origins, e.g.
- 
Method Details- 
originList of allowed origins, e.g."https://domain1.com".These values are placed in the Access-Control-Allow-Originheader of both the pre-flight response and the actual response."*"means that all origins are allowed.If undefined, all origins are allowed. - Parameters:
- origin- the list of allowed origins.
- Returns:
- the spec
 
- 
allowedHeadersList of request headers that can be used during the actual request.This property controls the value of the pre-flight response's Access-Control-Allow-Headersheader."*"means that all headers requested by the client are allowed.- Parameters:
- allowedHeaders- the list of request headers.
- Returns:
- the spec
 
- 
exposedHeadersList of response headers that the user-agent will allow the client to access.This property controls the value of actual response's Access-Control-Expose-Headersheader.- Parameters:
- exposedHeaders- the list of response headers.
- Returns:
- the spec
 
- 
methodList of supported HTTP request methods, e.g."{RequestMethod.GET, RequestMethod.POST}".Methods specified here override those specified via RequestMapping.- Parameters:
- method- the list of supported HTTP request methods
- Returns:
- the spec
 
- 
allowCredentialsWhether the browser should include any cookies associated with the domain of the request being annotated.Set to "false"if such cookies should not included.- Parameters:
- allowCredentials- the- booleanflag to include- Access-Control-Allow-Credentials=truein pre-flight response or not
- Returns:
- the spec
 
- 
maxAgeThe maximum age (in seconds) of the cache duration for pre-flight responses.This property controls the value of the Access-Control-Max-Ageheader in the pre-flight response.- Parameters:
- maxAge- the maximum age (in seconds) of the cache duration for pre-flight responses.
- Returns:
- the spec
 
 
-