程序包 org.springframework.web.cors.reactive
Reactive support for CORS (Cross-Origin Resource Sharing), based on a common
CorsProcessor
strategy.接口概要 接口 说明 CorsConfigurationSource Interface to be implemented by classes (usually HTTP request handlers) that provides aCorsConfiguration
instance based on the provided reactive request.CorsProcessor A strategy to apply CORS validation checks and updates to aServerWebExchange
, either rejecting through the response or adding CORS related headers, based on a pre-selectedCorsConfiguration
.类概要 类 说明 CorsUtils Utility class for CORS reactive request handling based on the CORS W3C recommendation.CorsWebFilter WebFilter
that handles CORS preflight requests and intercepts CORS simple and actual requests thanks to aCorsProcessor
implementation (DefaultCorsProcessor
by default) in order to add the relevant CORS response headers (likeAccess-Control-Allow-Origin
) using the providedCorsConfigurationSource
(for example anUrlBasedCorsConfigurationSource
instance.DefaultCorsProcessor The default implementation ofCorsProcessor
, as defined by the CORS W3C recommendation.UrlBasedCorsConfigurationSource Provide a per reactive requestCorsConfiguration
instance based on a collection ofCorsConfiguration
mapped on path patterns.