getStorageEngine();
if (!isset($collapseable)) {
$collapseable = true;
}
?>
-
'firewallEnabled',
'value' => wfConfig::get('firewallEnabled') ? '1': '0',
'title' => __('Enable Rate Limiting and Advanced Blocking', 'wordfence'),
'subtitle' => __('NOTE: This checkbox enables ALL blocking/throttling functions including IP, country and advanced blocking, and the "Rate Limiting Rules" below.', 'wordfence'),
'states' => array(
array('value' => '0', 'label' => __('Off', 'wordfence')),
array('value' => '1', 'label' => __('On', 'wordfence')),
),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_OPTION_ENABLE_ADVANCED_BLOCKING),
'noSpacer' => true,
'alignment' => 'wf-right',
))->render();
?>
-
'neverBlockBG',
'selectOptions' => array(
array('value' => 'neverBlockVerified', 'label' => __('Verified Google crawlers will not be rate-limited', 'wordfence')),
array('value' => 'neverBlockUA', 'label' => __('Anyone claiming to be Google will not be rate-limited', 'wordfence')),
array('value' => 'treatAsOtherCrawlers', 'label' => __('Treat Google like any other Crawler', 'wordfence')),
),
'selectValue' => wfConfig::get('neverBlockBG'),
'title' => __('How should we treat Google\'s crawlers', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_OPTION_GOOGLE_ACTION),
))->render();
?>
'DISABLED', 'label' => __('Unlimited', 'wordfence')),
array('value' => 1920, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 1920)),
array('value' => 960, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 960)),
array('value' => 480, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 480)),
array('value' => 240, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 240)),
array('value' => 120, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 120)),
array('value' => 60, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 60)),
array('value' => 30, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 30)),
array('value' => 15, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 15)),
array('value' => 10, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 10)),
array('value' => 5, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 5)),
array('value' => 4, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 4)),
array('value' => 3, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 3)),
array('value' => 2, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 2)),
array('value' => 1, 'label' => sprintf(/* translators: Number of HTTP requests. */__('%d per minute', 'wordfence'), 1)),
);
$actionOptions = array(
array('value' => 'throttle', 'label' => __('throttle it', 'wordfence')),
array('value' => 'block', 'label' => __('block it', 'wordfence')),
);
?>
-
'maxGlobalRequests_enabled',
'toggleValue' => !!wfConfig::get('maxGlobalRequests_enabled') ? 1 : 0,
'rateOptionName' => 'maxGlobalRequests',
'rateOptions' => $rateOptions,
'rateValue' => wfConfig::get('maxGlobalRequests'),
'lowValue' => 120,
'actionOptionName' => 'maxGlobalRequests_action',
'actionOptions' => $actionOptions,
'actionValue' => wfConfig::get('maxGlobalRequests_action'),
'title' => __('If anyone\'s requests exceed', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_ANY),
))->render();
?>
-
'maxRequestsCrawlers_enabled',
'toggleValue' => !!wfConfig::get('maxRequestsCrawlers_enabled') ? 1 : 0,
'rateOptionName' => 'maxRequestsCrawlers',
'rateOptions' => $rateOptions,
'rateValue' => wfConfig::get('maxRequestsCrawlers'),
'lowValue' => 120,
'actionOptionName' => 'maxRequestsCrawlers_action',
'actionOptions' => $actionOptions,
'actionValue' => wfConfig::get('maxRequestsCrawlers_action'),
'title' => __('If a crawler\'s page views exceed', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_CRAWLER),
))->render();
?>
-
'max404Crawlers_enabled',
'toggleValue' => !!wfConfig::get('max404Crawlers_enabled') ? 1 : 0,
'rateOptionName' => 'max404Crawlers',
'rateOptions' => $rateOptions,
'rateValue' => wfConfig::get('max404Crawlers'),
'lowValue' => 60,
'actionOptionName' => 'max404Crawlers_action',
'actionOptions' => $actionOptions,
'actionValue' => wfConfig::get('max404Crawlers_action'),
'title' => __('If a crawler\'s pages not found (404s) exceed', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_CRAWLER_404),
))->render();
?>
-
'maxRequestsHumans_enabled',
'toggleValue' => !!wfConfig::get('maxRequestsHumans_enabled') ? 1 : 0,
'rateOptionName' => 'maxRequestsHumans',
'rateOptions' => $rateOptions,
'rateValue' => wfConfig::get('maxRequestsHumans'),
'lowValue' => 120,
'actionOptionName' => 'maxRequestsHumans_action',
'actionOptions' => $actionOptions,
'actionValue' => wfConfig::get('maxRequestsHumans_action'),
'title' => __('If a human\'s page views exceed', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_HUMAN),
))->render();
?>
-
'max404Humans_enabled',
'toggleValue' => !!wfConfig::get('max404Humans_enabled') ? 1 : 0,
'rateOptionName' => 'max404Humans',
'rateOptions' => $rateOptions,
'rateValue' => wfConfig::get('max404Humans'),
'lowValue' => 60,
'actionOptionName' => 'max404Humans_action',
'actionOptions' => $actionOptions,
'actionValue' => wfConfig::get('max404Humans_action'),
'title' => __('If a human\'s pages not found (404s) exceed', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_OPTION_RATE_LIMIT_HUMAN_404),
))->render();
?>
-
$b, 'label' => wfUtils::makeDuration($b));
}
echo wfView::create('options/option-select', array(
'selectOptionName' => 'blockedTime',
'selectOptions' => $options,
'selectValue' => wfConfig::getInt('blockedTime'),
'title' => __('How long is an IP address blocked when it breaks a rule', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_OPTION_AUTOMATIC_BLOCK_DURATION),
))->render();
?>
-
'allowed404s',
'textValue' => wfUtils::cleanupOneEntryPerLine(wfConfig::get('allowed404s')),
'title' => __('Allowlisted 404 URLs', 'wordfence'),
'subtitle' => __('These URL patterns will be excluded from the throttling rules used to limit crawlers.', 'wordfence'),
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_FIREWALL_WAF_OPTION_WHITELISTED_404),
))->render();
?>