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 Type
    Method
    Description
    boolean
    process(CorsConfiguration configuration, ServerWebExchange exchange)
    Process a request using the given CorsConfiguration.
  • Method Details

    • process

      boolean process(@Nullable CorsConfiguration configuration, ServerWebExchange exchange)
      Process a request using the given CorsConfiguration.
      Parameters:
      configuration - the CORS configuration to use; possibly null 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