Interface CorsProcessor
- All Known Implementing Classes:
DefaultCorsProcessor
public interface CorsProcessor
A strategy to apply CORS validation checks and updates to a
ServerWebExchange
, either rejecting through the response or adding
CORS related headers, based on a pre-selected CorsConfiguration
.- Since:
- 5.0
- Author:
- Sebastien Deleuze, Rossen Stoyanchev
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
process
(CorsConfiguration configuration, ServerWebExchange exchange) Process a request using the givenCorsConfiguration
.
-
Method Details
-
process
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
-