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. |
org.springframework.web.reactive.config |
Spring WebFlux configuration infrastructure.
|
org.springframework.web.reactive.handler |
Provides HandlerMapping implementations including abstract base classes.
|
org.springframework.web.reactive.result.method |
Infrastructure for handler method processing.
|
org.springframework.web.reactive.result.method.annotation |
Infrastructure for annotation-based handler method processing.
|
org.springframework.web.servlet.config |
Defines the XML configuration namespace for Spring MVC.
|
org.springframework.web.servlet.config.annotation |
Annotation-based setup for Spring MVC.
|
org.springframework.web.servlet.handler |
Provides standard HandlerMapping implementations,
including abstract base classes for custom implementations.
|
org.springframework.web.servlet.mvc.method.annotation |
MVC infrastructure for annotation-based handler method processing, building on the
org.springframework.web.method.annotation package. |
org.springframework.web.servlet.resource |
Support classes for serving static resources.
|
org.springframework.web.socket.sockjs.support |
Support classes for SockJS including an
AbstractSockJsService
implementation. |
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 |
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. |
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 |
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(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 |
CorsConfigurationSource.getCorsConfiguration(ServerWebExchange exchange)
Return a
CorsConfiguration based on the incoming request. |
CorsConfiguration |
UrlBasedCorsConfigurationSource.getCorsConfiguration(ServerWebExchange exchange) |
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 |
DefaultCorsProcessor.process(CorsConfiguration config,
ServerWebExchange exchange) |
boolean |
CorsProcessor.process(CorsConfiguration configuration,
ServerWebExchange exchange)
Process a request using the given
CorsConfiguration . |
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.
|
Modifier and Type | Method and Description |
---|---|
protected CorsConfiguration |
CorsRegistration.getCorsConfiguration() |
Modifier and Type | Method and Description |
---|---|
protected Map<String,CorsConfiguration> |
WebFluxConfigurationSupport.getCorsConfigurations()
Callback for building the global CORS configuration.
|
protected Map<String,CorsConfiguration> |
CorsRegistry.getCorsConfigurations()
Return the registered
CorsConfiguration objects,
keyed by path pattern. |
Modifier and Type | Method and Description |
---|---|
CorsRegistration |
CorsRegistration.combine(CorsConfiguration other)
Apply the given
CorsConfiguration to the one being configured via
combine(CorsConfiguration) which in turn has been
initialized with applyPermitDefaultValues() . |
Modifier and Type | Method and Description |
---|---|
protected CorsConfiguration |
AbstractHandlerMapping.getCorsConfiguration(Object handler,
ServerWebExchange exchange)
Retrieve the CORS configuration for the given handler.
|
Modifier and Type | Method and Description |
---|---|
void |
AbstractHandlerMapping.setCorsConfigurations(Map<String,CorsConfiguration> corsConfigurations)
Set the "global" CORS configurations based on URL patterns.
|
Modifier and Type | Method and Description |
---|---|
protected CorsConfiguration |
AbstractHandlerMethodMapping.getCorsConfiguration(Object handler,
ServerWebExchange exchange) |
protected CorsConfiguration |
AbstractHandlerMethodMapping.initCorsConfiguration(Object handler,
Method method,
T mapping)
Extract and return the CORS configuration for the mapping.
|
Modifier and Type | Method and Description |
---|---|
protected CorsConfiguration |
RequestMappingHandlerMapping.initCorsConfiguration(Object handler,
Method method,
RequestMappingInfo mappingInfo) |
Modifier and Type | Method and Description |
---|---|
static RuntimeBeanReference |
MvcNamespaceUtils.registerCorsConfigurations(Map<String,CorsConfiguration> corsConfigurations,
ParserContext context,
Object source)
Registers a
Map<String, CorsConfiguration> (mapped CorsConfiguration s)
under a well-known name unless already registered. |
Modifier and Type | Method and Description |
---|---|
protected CorsConfiguration |
CorsRegistration.getCorsConfiguration() |
Modifier and Type | Method and Description |
---|---|
protected Map<String,CorsConfiguration> |
WebMvcConfigurationSupport.getCorsConfigurations()
Return the registered
CorsConfiguration objects,
keyed by path pattern. |
protected Map<String,CorsConfiguration> |
CorsRegistry.getCorsConfigurations()
Return the registered
CorsConfiguration objects,
keyed by path pattern. |
Modifier and Type | Method and Description |
---|---|
CorsRegistration |
CorsRegistration.combine(CorsConfiguration other)
Apply the given
CorsConfiguration to the one being configured via
combine(CorsConfiguration) which in turn has been
initialized with applyPermitDefaultValues() . |
Modifier and Type | Method and Description |
---|---|
CorsConfiguration |
HandlerMappingIntrospector.getCorsConfiguration(HttpServletRequest request) |
protected CorsConfiguration |
AbstractHandlerMapping.getCorsConfiguration(Object handler,
HttpServletRequest request)
Retrieve the CORS configuration for the given handler.
|
protected CorsConfiguration |
AbstractHandlerMethodMapping.getCorsConfiguration(Object handler,
HttpServletRequest request) |
protected CorsConfiguration |
AbstractHandlerMethodMapping.initCorsConfiguration(Object handler,
Method method,
T mapping)
Extract and return the CORS configuration for the mapping.
|
Modifier and Type | Method and Description |
---|---|
protected HandlerExecutionChain |
AbstractHandlerMapping.getCorsHandlerExecutionChain(HttpServletRequest request,
HandlerExecutionChain chain,
CorsConfiguration config)
Update the HandlerExecutionChain for CORS-related handling.
|
Modifier and Type | Method and Description |
---|---|
void |
AbstractHandlerMapping.setCorsConfigurations(Map<String,CorsConfiguration> corsConfigurations)
Set "global" CORS configuration mappings.
|
Modifier and Type | Method and Description |
---|---|
protected CorsConfiguration |
RequestMappingHandlerMapping.initCorsConfiguration(Object handler,
Method method,
RequestMappingInfo mappingInfo) |
Modifier and Type | Method and Description |
---|---|
CorsConfiguration |
ResourceHttpRequestHandler.getCorsConfiguration(HttpServletRequest request)
Return the specified CORS configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
ResourceHttpRequestHandler.setCorsConfiguration(CorsConfiguration corsConfiguration)
Specify the CORS configuration for resources served by this handler.
|
Modifier and Type | Field and Description |
---|---|
protected CorsConfiguration |
AbstractSockJsService.corsConfiguration |
Modifier and Type | Method and Description |
---|---|
CorsConfiguration |
AbstractSockJsService.getCorsConfiguration(HttpServletRequest request) |
CorsConfiguration |
SockJsHttpRequestHandler.getCorsConfiguration(HttpServletRequest request) |