Rename CorsProcessor#processRequest to process
This commit is contained in:
@@ -23,8 +23,8 @@ import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
/**
|
||||
* A strategy that takes a reactive request and a {@link CorsConfiguration} and updates
|
||||
* the response.
|
||||
* A strategy that takes a reactive HTTP exchange and a {@link CorsConfiguration} and
|
||||
* updates the response.
|
||||
*
|
||||
* <p>This component is not concerned with how a {@code CorsConfiguration} is
|
||||
* selected but rather takes follow-up actions such as applying CORS validation
|
||||
@@ -39,11 +39,11 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
public interface CorsProcessor {
|
||||
|
||||
/**
|
||||
* Process a request given a {@code CorsConfiguration}.
|
||||
* Process an HTTP exchange given a {@code CorsConfiguration}.
|
||||
* @param configuration the applicable CORS configuration (possibly {@code null})
|
||||
* @param exchange the current HTTP request / response
|
||||
* @return a {@link Mono} emitting {@code false} if the request is rejected, {@code true} otherwise
|
||||
*/
|
||||
boolean processRequest(@Nullable CorsConfiguration configuration, ServerWebExchange exchange);
|
||||
boolean process(@Nullable CorsConfiguration configuration, ServerWebExchange exchange);
|
||||
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class DefaultCorsProcessor implements CorsProcessor {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean processRequest(@Nullable CorsConfiguration config, ServerWebExchange exchange) {
|
||||
public boolean process(@Nullable CorsConfiguration config, ServerWebExchange exchange) {
|
||||
|
||||
ServerHttpRequest request = exchange.getRequest();
|
||||
ServerHttpResponse response = exchange.getResponse();
|
||||
|
||||
Reference in New Issue
Block a user