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
CorsConfiguration does not permit any cross-origin
requests and must be configured explicitly. |
CorsConfiguration |
CorsConfiguration.combine(CorsConfiguration other)
Combine the non-null properties of the supplied
CorsConfiguration with this one. |
CorsConfiguration |
UrlBasedCorsConfigurationSource.getCorsConfiguration(HttpServletRequest request) |
CorsConfiguration |
CorsConfigurationSource.getCorsConfiguration(HttpServletRequest request)
Return a
CorsConfiguration based on the incoming request. |
CorsConfiguration |
CorsConfiguration.setAllowedOriginPatterns(List<String> allowedOriginPatterns)
Alternative to
setAllowedOrigins(java.util.List<java.lang.String>) that supports origins declared
via wildcard patterns. |
Modifier and Type | Method and Description |
---|---|
Map<String,CorsConfiguration> |
UrlBasedCorsConfigurationSource.getCorsConfigurations()
Return all configured CORS mappings.
|
Modifier and Type | Method and Description |
---|---|
protected List<String> |
DefaultCorsProcessor.checkHeaders(CorsConfiguration config,
List<String> requestHeaders)
Check the headers and determine the headers for the response of a
pre-flight request.
|
protected 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 String |
DefaultCorsProcessor.checkOrigin(CorsConfiguration config,
String requestOrigin)
Check the origin and determine the origin for the response.
|
CorsConfiguration |
CorsConfiguration.combine(CorsConfiguration other)
Combine the non-null properties of the supplied
CorsConfiguration with this one. |
protected boolean |
DefaultCorsProcessor.handleInternal(ServerHttpRequest request,
ServerHttpResponse response,
CorsConfiguration config,
boolean preFlightRequest)
Handle the given request.
|
boolean |
CorsProcessor.processRequest(CorsConfiguration configuration,
HttpServletRequest request,
HttpServletResponse response)
Process a request given a
CorsConfiguration . |
boolean |
DefaultCorsProcessor.processRequest(CorsConfiguration config,
HttpServletRequest request,
HttpServletResponse response) |
void |
UrlBasedCorsConfigurationSource.registerCorsConfiguration(String pattern,
CorsConfiguration config)
Variant of
UrlBasedCorsConfigurationSource.setCorsConfigurations(Map) to register one mapping at a time. |
Modifier and Type | Method and Description |
---|---|
void |
UrlBasedCorsConfigurationSource.setCorsConfigurations(Map<String,CorsConfiguration> corsConfigurations)
Set the CORS configuration mappings.
|
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 List<String> |
DefaultCorsProcessor.checkHeaders(CorsConfiguration config,
List<String> requestHeaders)
Check the headers and determine the headers for the response of a
pre-flight request.
|
protected 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 String |
DefaultCorsProcessor.checkOrigin(CorsConfiguration config,
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 |
CorsProcessor.process(CorsConfiguration configuration,
ServerWebExchange exchange)
Process a request using the given
CorsConfiguration . |
boolean |
DefaultCorsProcessor.process(CorsConfiguration config,
ServerWebExchange exchange) |
void |
UrlBasedCorsConfigurationSource.registerCorsConfiguration(String path,
CorsConfiguration config)
Register a
CorsConfiguration for the specified path pattern. |
Modifier and Type | Method and Description |
---|---|
void |
UrlBasedCorsConfigurationSource.setCorsConfigurations(Map<String,CorsConfiguration> configMap)
Set CORS configuration based on URL patterns.
|