Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Model/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Rules
{
private const PROTOCOL_VERSION = '1';
private const FLAG_CODE = 'sansec_shield_rules';
private const RULES_FETCH_TIMEOUT = 30;

/** @var Config */
private $config;
Expand Down Expand Up @@ -76,6 +77,7 @@ private function fetchRules(): array
{
$curl = $this->curlFactory->create();
$curl->setCredentials($this->config->getLicenseKey(), $this->config->getLicenseKey());
$curl->setTimeout(self::RULES_FETCH_TIMEOUT);
$curl->get(sprintf("%s?v=%d", $this->config->getRulesUrl(), self::PROTOCOL_VERSION));

if ($curl->getStatus() !== 200) {
Expand Down