Interface CorsProcessor
- All Known Implementing Classes:
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
.- Since:
- 5.0
- Author:
- Sebastien Deleuze, Rossen Stoyanchev
- See Also:
- CORS W3C recommendation
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
process(CorsConfiguration configuration, ServerWebExchange exchange)
Process a request using the givenCorsConfiguration
.
Method Detail
process
boolean process(@Nullable CorsConfiguration configuration, ServerWebExchange exchange)
Process a request using the givenCorsConfiguration
.- Parameters:
configuration
- the CORS configuration to use; possiblynull
in which case pre-flight requests are rejected, but all others allowed.exchange
- the current exchange- Returns:
false
if the request was rejected,true
otherwise