public function aroundDispatch(FrontController $subject, callable $proceed, ...$args) // @codingStandardsIgnoreLine - unused parameter
    {
        $isRateLimitingEnabled = $this->config->isRateLimitingEnabled();
        $isCrawlerProtectionEnabled = $this->config->isCrawlerProtectionEnabled();

        if (!$isRateLimitingEnabled && !$isCrawlerProtectionEnabled) {
            return $proceed(...$args);
        }

        $path = strtolower($this->request->getPathInfo());

        if ($isRateLimitingEnabled && $this->sensitivePathProtection($path)) {
            return $this->response;
        }

        if ($isCrawlerProtectionEnabled && $this->crawlerProtection($path)) {
            return $this->response;
        }

        return $proceed(...$args);
    }
public function aroundDispatch(FrontController $subject, callable $proceed, ...$args) 
    {
        $isRateLimitingEnabled = $this->config->isRateLimitingEnabled();
        $isCrawlerProtectionEnabled = $this->config->isCrawlerProtectionEnabled();

        if (!$isRateLimitingEnabled && !$isCrawlerProtectionEnabled) {
            return $proceed(...$args);
        }

        $path = strtolower($this->request->getPathInfo());

        if ($isRateLimitingEnabled && $this->sensitivePathProtection($path)) {
            return $this->response;
        }

        if ($isCrawlerProtectionEnabled && $this->crawlerProtection($path)) {
            return $this->response;
        }

        return $proceed(...$args);
    }
public function aroundDispatch ( FrontController $ subject , callable $ proceed , ... $ args ) // @codingStandardsIgnoreLine - unused parameter { $ isRateLimitingEnabled = $ this -> config -> isRateLimitingEnabled ( ) ; $ isCrawlerProtectionEnabled = $ this -> config -> isCrawlerProtectionEnabled ( ) ; if ( ! $ isRateLimitingEnabled && ! $ isCrawlerProtectionEnabled ) { return $ proceed ( ... $ args ) ; } $ path = strtolower ( $ this -> request -> getPathInfo ( ) ) ; if ( $ isRateLimitingEnabled && $ this -> sensitivePathProtection ( $ path ) ) { return $ this -> response ; } if ( $ isCrawlerProtectionEnabled && $ this -> crawlerProtection ( $ path ) ) { return $ this -> response ; } return $ proceed ( ... $ args ) ; }
Check if request is limited
@param FrontController $subject
@param callable $proceed
@param mixed ...$args
@return \Magento\Framework\App\Response\Http|\Magento\Framework\App\ResponseInterface
Check if request is limited