Package org.springframework.web.cors

# Interface CorsProcessor

All Known Implementing Classes:
  `DefaultCorsProcessor`

public interface CorsProcessor
A strategy that takes a request and a `CorsConfiguration` and updates the response.

This component is not concerned with how a `CorsConfiguration` is selected but rather takes follow-up actions such as applying CORS validation checks and either rejecting the response or adding CORS headers to the response.

Since:
  4.2
Author:
  Sebastien Deleuze, Rossen Stoyanchev
See Also:
  - CORS W3C recommendation
  - `org.springframework.web.servlet.handler.AbstractHandlerMapping#setCorsProcessor`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`processRequest(CorsConfiguration configuration, HttpServletRequest request, HttpServletResponse response)`
Process a request given a `CorsConfiguration`.

## Method Details

### processRequest

boolean processRequest(@Nullable CorsConfiguration configuration, HttpServletRequest request, HttpServletResponse response) throws IOException
Process a request given a `CorsConfiguration`.

Parameters:
  `configuration` - the applicable CORS configuration (possibly `null`)
  `request` - the current request
  `response` - the current response
Returns:
  `false` if the request is rejected, `true` otherwise
Throws:
  `IOException`