public function isPreflightRequest(HttpRequest $request)
    {
        return $this->isCorsRequest($request)
            && strtoupper($request->getMethod()) === 'OPTIONS'
            && $request->getHeaders()->has('Access-Control-Request-Method');
    }
public function isPreflightRequest(HttpRequest $request)
    {
        return $this->isCorsRequest($request)
            && strtoupper($request->getMethod()) === 'OPTIONS'
            && $request->getHeaders()->has('Access-Control-Request-Method');
    }
public function isPreflightRequest ( HttpRequest $ request ) { return $ this -> isCorsRequest ( $ request ) && strtoupper ( $ request -> getMethod ( ) ) === 'OPTIONS' && $ request -> getHeaders ( ) -> has ( 'Access-Control-Request-Method' ) ; }
Check if the CORS request is a preflight request

@param  HttpRequest $request
@return bool
Check if the CORS request is a preflight request