static boolean isPreflightRequest(HttpRequest request) {
        HttpHeaders headers = request.getHeaders();
        Optional<String> origin = headers.getOrigin();
        return origin.isPresent() && headers.contains(ACCESS_CONTROL_REQUEST_METHOD) && HttpMethod.OPTIONS == request.getMethod();
    }
static boolean isPreflightRequest ( HttpRequest request ) { HttpHeaders headers = request . getHeaders ( ) ; Optional < String > origin = headers . getOrigin ( ) ; return origin . isPresent ( ) && headers . contains ( ACCESS_CONTROL_REQUEST_METHOD ) && HttpMethod . OPTIONS == request . getMethod ( ) ; }
@param request The {@link HttpRequest} object
@return Return whether this request is a pre-flight request