接口 CorsProcessor
- 所有已知实现类:
DefaultCorsProcessor
public interface 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
.- 从以下版本开始:
- 5.0
- 作者:
- Sebastien Deleuze, Rossen Stoyanchev
- 另请参阅:
- CORS W3C recommendation
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 boolean
process(CorsConfiguration configuration, ServerWebExchange exchange)
Process a request using the givenCorsConfiguration
.
方法详细资料
process
boolean process(@Nullable CorsConfiguration configuration, ServerWebExchange exchange)
Process a request using the givenCorsConfiguration
.- 参数:
configuration
- the CORS configuration to use; possiblynull
in which case pre-flight requests are rejected, but all others allowed.exchange
- the current exchange- 返回:
false
if the request was rejected,true
otherwise