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:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
processRequest
(CorsConfiguration configuration, HttpServletRequest request, HttpServletResponse response) Process a request given aCorsConfiguration
.
-
Method Details
-
processRequest
boolean processRequest(@Nullable CorsConfiguration configuration, HttpServletRequest request, HttpServletResponse response) throws IOException Process a request given aCorsConfiguration
.- Parameters:
configuration
- the applicable CORS configuration (possiblynull
)request
- the current requestresponse
- the current response- Returns:
false
if the request is rejected,true
otherwise- Throws:
IOException
-