# Uses of Class
org.springframework.web.cors.CorsConfiguration

Packages that use CorsConfiguration
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.

## Uses of CorsConfiguration in org.springframework.web.cors

Methods in org.springframework.web.cors that return CorsConfiguration
Modifier and Type
Method
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`
CorsConfigurationSource.`getCorsConfiguration(HttpServletRequest request)`
Return a `CorsConfiguration` based on the incoming request.
`CorsConfiguration`
UrlBasedCorsConfigurationSource.`getCorsConfiguration(HttpServletRequest request)`
`CorsConfiguration`
CorsConfiguration.`setAllowedOriginPatterns(List<String> allowedOriginPatterns)`
Alternative to `setAllowedOrigins(java.util.List<java.lang.String>)` that supports more flexible origins patterns with "*" anywhere in the host name in addition to port lists.
Methods in org.springframework.web.cors that return types with arguments of type CorsConfiguration
Modifier and Type
Method
Description
`Map<String,CorsConfiguration>`
UrlBasedCorsConfigurationSource.`getCorsConfigurations()`
Return all configured CORS mappings.
Methods in org.springframework.web.cors with parameters of type CorsConfiguration
Modifier and Type
Method
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.
Method parameters in org.springframework.web.cors with type arguments of type CorsConfiguration
Modifier and Type
Method
Description
`void`
UrlBasedCorsConfigurationSource.`setCorsConfigurations(Map<String,CorsConfiguration> corsConfigurations)`
Set the CORS configuration mappings.
Constructors in org.springframework.web.cors with parameters of type CorsConfiguration
Modifier
Constructor
Description
``
`CorsConfiguration(CorsConfiguration other)`
Construct a new `CorsConfiguration` instance by copying all values from the supplied `CorsConfiguration`.

## Uses of CorsConfiguration in org.springframework.web.cors.reactive

Methods in org.springframework.web.cors.reactive that return CorsConfiguration
Modifier and Type
Method
Description
`CorsConfiguration`
CorsConfigurationSource.`getCorsConfiguration(ServerWebExchange exchange)`
Return a `CorsConfiguration` based on the incoming request.
`CorsConfiguration`
UrlBasedCorsConfigurationSource.`getCorsConfiguration(ServerWebExchange exchange)`
Methods in org.springframework.web.cors.reactive with parameters of type CorsConfiguration
Modifier and Type
Method
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.
Method parameters in org.springframework.web.cors.reactive with type arguments of type CorsConfiguration
Modifier and Type
Method
Description
`void`
UrlBasedCorsConfigurationSource.`setCorsConfigurations(Map<String,CorsConfiguration> configMap)`
Set CORS configuration based on URL patterns.