Package | Description |
---|---|
org.springframework.web.cors |
Support for CORS (Cross-Origin Resource Sharing),
based on a common
CorsProcessor strategy. |
org.springframework.web.cors.reactive |
Reactive support for CORS (Cross-Origin Resource Sharing),
based on a common
CorsProcessor strategy. |
Modifier and Type | Method and Description |
---|---|
CorsConfiguration |
CorsConfiguration.applyPermitDefaultValues()
By default a newly created
CorsConfiguration does not permit any
cross-origin requests and must be configured explicitly to indicate what
should be allowed. |
CorsConfiguration |
CorsConfiguration.combine(CorsConfiguration other)
Combine the supplied
CorsConfiguration with this one. |
CorsConfiguration |
UrlBasedCorsConfigurationSource.getCorsConfiguration(HttpServletRequest request) |
CorsConfiguration |
CorsConfigurationSource.getCorsConfiguration(HttpServletRequest request)
Return a
CorsConfiguration based on the incoming request. |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,CorsConfiguration> |
UrlBasedCorsConfigurationSource.getCorsConfigurations()
Get the CORS configuration.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<java.lang.String> |
DefaultCorsProcessor.checkHeaders(CorsConfiguration config,
java.util.List<java.lang.String> requestHeaders)
Check the headers and determine the headers for the response of a
pre-flight request.
|
protected java.util.List<HttpMethod> |
DefaultCorsProcessor.checkMethods(CorsConfiguration config,
HttpMethod requestMethod)
Check the HTTP method and determine the methods for the response of a
pre-flight request.
|
protected java.lang.String |
DefaultCorsProcessor.checkOrigin(CorsConfiguration config,
java.lang.String requestOrigin)
Check the origin and determine the origin for the response.
|
CorsConfiguration |
CorsConfiguration.combine(CorsConfiguration other)
Combine the supplied
CorsConfiguration with this one. |
protected boolean |
DefaultCorsProcessor.handleInternal(ServerHttpRequest request,
ServerHttpResponse response,
CorsConfiguration config,
boolean preFlightRequest)
Handle the given request.
|
boolean |
DefaultCorsProcessor.processRequest(CorsConfiguration config,
HttpServletRequest request,
HttpServletResponse response) |
boolean |
CorsProcessor.processRequest(CorsConfiguration configuration,
HttpServletRequest request,
HttpServletResponse response)
Process a request given a
CorsConfiguration . |
void |
UrlBasedCorsConfigurationSource.registerCorsConfiguration(java.lang.String path,
CorsConfiguration config)
Register a
CorsConfiguration for the specified path pattern. |
Modifier and Type | Method and Description |
---|---|
void |
UrlBasedCorsConfigurationSource.setCorsConfigurations(java.util.Map<java.lang.String,CorsConfiguration> corsConfigurations)
Set CORS configuration based on URL patterns.
|
Constructor and Description |
---|
CorsConfiguration(CorsConfiguration other)
Construct a new
CorsConfiguration instance by copying all
values from the supplied CorsConfiguration . |
Modifier and Type | Method and Description |
---|---|
CorsConfiguration |
UrlBasedCorsConfigurationSource.getCorsConfiguration(ServerWebExchange exchange) |
CorsConfiguration |
CorsConfigurationSource.getCorsConfiguration(ServerWebExchange exchange)
Return a
CorsConfiguration based on the incoming request. |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<java.lang.String> |
DefaultCorsProcessor.checkHeaders(CorsConfiguration config,
java.util.List<java.lang.String> requestHeaders)
Check the headers and determine the headers for the response of a
pre-flight request.
|
protected java.util.List<HttpMethod> |
DefaultCorsProcessor.checkMethods(CorsConfiguration config,
HttpMethod requestMethod)
Check the HTTP method and determine the methods for the response of a
pre-flight request.
|
protected java.lang.String |
DefaultCorsProcessor.checkOrigin(CorsConfiguration config,
java.lang.String requestOrigin)
Check the origin and determine the origin for the response.
|
protected boolean |
DefaultCorsProcessor.handleInternal(ServerWebExchange exchange,
CorsConfiguration config,
boolean preFlightRequest)
Handle the given request.
|
boolean |
DefaultCorsProcessor.process(CorsConfiguration config,
ServerWebExchange exchange) |
boolean |
CorsProcessor.process(CorsConfiguration configuration,
ServerWebExchange exchange)
Process an HTTP exchange given a
CorsConfiguration . |
void |
UrlBasedCorsConfigurationSource.registerCorsConfiguration(java.lang.String path,
CorsConfiguration config)
Register a
CorsConfiguration for the specified path pattern. |
Modifier and Type | Method and Description |
---|---|
void |
UrlBasedCorsConfigurationSource.setCorsConfigurations(java.util.Map<java.lang.String,CorsConfiguration> corsConfigurations)
Set CORS configuration based on URL patterns.
|