Uses of Class
org.springframework.web.cors.CorsConfiguration
Package
Description
Support for CORS (Cross-Origin Resource Sharing),
based on a common
CorsProcessor
strategy.Reactive support for CORS (Cross-Origin Resource Sharing),
based on a common
CorsProcessor
strategy.Spring WebFlux configuration infrastructure.
Provides HandlerMapping implementations including abstract base classes.
Infrastructure for handler method processing.
Infrastructure for annotation-based handler method processing.
Defines the XML configuration namespace for Spring MVC.
Annotation-based setup for Spring MVC.
Provides standard HandlerMapping implementations,
including abstract base classes for custom implementations.
MVC infrastructure for annotation-based handler method processing, building on the
org.springframework.web.method.annotation
package.Support classes for serving static resources.
Support classes for SockJS including an
AbstractSockJsService
implementation.-
Uses of CorsConfiguration in org.springframework.web.cors
Modifier and TypeMethodDescriptionCorsConfiguration.applyPermitDefaultValues()
By defaultCorsConfiguration
does not permit any cross-origin requests and must be configured explicitly.CorsConfiguration.combine
(CorsConfiguration other) Combine the non-null properties of the suppliedCorsConfiguration
with this one.CorsConfigurationSource.getCorsConfiguration
(HttpServletRequest request) Return aCorsConfiguration
based on the incoming request.UrlBasedCorsConfigurationSource.getCorsConfiguration
(HttpServletRequest request) CorsConfiguration.setAllowedOriginPatterns
(List<String> allowedOriginPatterns) Alternative tosetAllowedOrigins(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 TypeMethodDescriptionUrlBasedCorsConfigurationSource.getCorsConfigurations()
Return all configured CORS mappings.Modifier and TypeMethodDescriptionDefaultCorsProcessor.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.combine
(CorsConfiguration other) Combine the non-null properties of the suppliedCorsConfiguration
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 aCorsConfiguration
.boolean
DefaultCorsProcessor.processRequest
(CorsConfiguration config, HttpServletRequest request, HttpServletResponse response) void
UrlBasedCorsConfigurationSource.registerCorsConfiguration
(String pattern, CorsConfiguration config) Variant ofUrlBasedCorsConfigurationSource.setCorsConfigurations(Map)
to register one mapping at a time.Modifier and TypeMethodDescriptionvoid
UrlBasedCorsConfigurationSource.setCorsConfigurations
(Map<String, CorsConfiguration> corsConfigurations) Set the CORS configuration mappings.ModifierConstructorDescriptionConstruct a newCorsConfiguration
instance by copying all values from the suppliedCorsConfiguration
. -
Uses of CorsConfiguration in org.springframework.web.cors.reactive
Modifier and TypeMethodDescriptionCorsConfigurationSource.getCorsConfiguration
(ServerWebExchange exchange) Return aCorsConfiguration
based on the incoming request.UrlBasedCorsConfigurationSource.getCorsConfiguration
(ServerWebExchange exchange) Modifier and TypeMethodDescriptionDefaultCorsProcessor.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 givenCorsConfiguration
.boolean
DefaultCorsProcessor.process
(CorsConfiguration config, ServerWebExchange exchange) void
UrlBasedCorsConfigurationSource.registerCorsConfiguration
(String path, CorsConfiguration config) Register aCorsConfiguration
for the specified path pattern.Modifier and TypeMethodDescriptionvoid
UrlBasedCorsConfigurationSource.setCorsConfigurations
(Map<String, CorsConfiguration> configMap) Set CORS configuration based on URL patterns. -
Uses of CorsConfiguration in org.springframework.web.reactive.config
Modifier and TypeMethodDescriptionprotected CorsConfiguration
CorsRegistration.getCorsConfiguration()
Modifier and TypeMethodDescriptionprotected Map<String,
CorsConfiguration> CorsRegistry.getCorsConfigurations()
Return the registeredCorsConfiguration
objects, keyed by path pattern.protected final Map<String,
CorsConfiguration> WebFluxConfigurationSupport.getCorsConfigurations()
Callback for building the global CORS configuration.Modifier and TypeMethodDescriptionCorsRegistration.combine
(CorsConfiguration other) Apply the givenCorsConfiguration
to the one being configured viacombine(CorsConfiguration)
which in turn has been initialized withapplyPermitDefaultValues()
. -
Uses of CorsConfiguration in org.springframework.web.reactive.handler
Modifier and TypeMethodDescriptionprotected CorsConfiguration
AbstractHandlerMapping.getCorsConfiguration
(Object handler, ServerWebExchange exchange) Retrieve the CORS configuration for the given handler.Modifier and TypeMethodDescriptionvoid
AbstractHandlerMapping.setCorsConfigurations
(Map<String, CorsConfiguration> corsConfigurations) Set the "global" CORS configurations based on URL patterns. -
Uses of CorsConfiguration in org.springframework.web.reactive.result.method
Modifier and TypeMethodDescriptionprotected 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. -
Uses of CorsConfiguration in org.springframework.web.reactive.result.method.annotation
Modifier and TypeMethodDescriptionprotected CorsConfiguration
RequestMappingHandlerMapping.initCorsConfiguration
(Object handler, Method method, RequestMappingInfo mappingInfo) -
Uses of CorsConfiguration in org.springframework.web.servlet.config
Modifier and TypeMethodDescriptionstatic RuntimeBeanReference
MvcNamespaceUtils.registerCorsConfigurations
(Map<String, CorsConfiguration> corsConfigurations, ParserContext context, Object source) Registers aMap<String, CorsConfiguration>
(mappedCorsConfiguration
s) under a well-known name unless already registered. -
Uses of CorsConfiguration in org.springframework.web.servlet.config.annotation
Modifier and TypeMethodDescriptionprotected CorsConfiguration
CorsRegistration.getCorsConfiguration()
Modifier and TypeMethodDescriptionprotected Map<String,
CorsConfiguration> CorsRegistry.getCorsConfigurations()
Return the registeredCorsConfiguration
objects, keyed by path pattern.protected final Map<String,
CorsConfiguration> WebMvcConfigurationSupport.getCorsConfigurations()
Return the registeredCorsConfiguration
objects, keyed by path pattern.Modifier and TypeMethodDescriptionCorsRegistration.combine
(CorsConfiguration other) Apply the givenCorsConfiguration
to the one being configured viacombine(CorsConfiguration)
which in turn has been initialized withapplyPermitDefaultValues()
. -
Uses of CorsConfiguration in org.springframework.web.servlet.handler
Modifier and TypeMethodDescriptionHandlerMappingIntrospector.CachedResult.getCorsConfig()
protected CorsConfiguration
AbstractHandlerMapping.getCorsConfiguration
(Object handler, HttpServletRequest request) Retrieve the CORS configuration for the given handler.protected CorsConfiguration
AbstractHandlerMethodMapping.getCorsConfiguration
(Object handler, HttpServletRequest request) HandlerMappingIntrospector.getCorsConfiguration
(HttpServletRequest request) protected CorsConfiguration
AbstractHandlerMethodMapping.initCorsConfiguration
(Object handler, Method method, T mapping) Extract and return the CORS configuration for the mapping.Modifier and TypeMethodDescriptionprotected HandlerExecutionChain
AbstractHandlerMapping.getCorsHandlerExecutionChain
(HttpServletRequest request, HandlerExecutionChain chain, CorsConfiguration config) UpdateHandlerExecutionChain
for CORS requests, inserting an interceptor at the start of the chain to perform CORS checks, and also using a no-op handler for preflight requests.Modifier and TypeMethodDescriptionvoid
AbstractHandlerMapping.setCorsConfigurations
(Map<String, CorsConfiguration> corsConfigurations) Set "global" CORS configuration mappings. -
Uses of CorsConfiguration in org.springframework.web.servlet.mvc.method.annotation
Modifier and TypeMethodDescriptionprotected CorsConfiguration
RequestMappingHandlerMapping.initCorsConfiguration
(Object handler, Method method, RequestMappingInfo mappingInfo) -
Uses of CorsConfiguration in org.springframework.web.servlet.resource
Modifier and TypeMethodDescriptionResourceHttpRequestHandler.getCorsConfiguration
(HttpServletRequest request) Return the specified CORS configuration.Modifier and TypeMethodDescriptionvoid
ResourceHttpRequestHandler.setCorsConfiguration
(CorsConfiguration corsConfiguration) Specify the CORS configuration for resources served by this handler. -
Uses of CorsConfiguration in org.springframework.web.socket.sockjs.support
Modifier and TypeFieldDescriptionprotected final CorsConfiguration
AbstractSockJsService.corsConfiguration
Modifier and TypeMethodDescriptionAbstractSockJsService.getCorsConfiguration
(HttpServletRequest request) SockJsHttpRequestHandler.getCorsConfiguration
(HttpServletRequest request)