[UPDATE] Send proper header when ajax calls are rate-limited

This commit is contained in:
Sebastian Grewe 2018-05-25 11:05:24 +02:00
parent 47f5a9df11
commit bbe7ac16a6

View File

@ -71,7 +71,7 @@ if ($config['memcache']['enabled'] && $config['mc_antidos']['enabled']) {
if (!$skip_check) {
$mcad = new MemcacheAntiDos($config, $memcache, $per_page);
if ($config['mc_antidos']['protect_ajax'] && $is_ajax_call && $mcad->rate_limit_api_request) {
exit(header('HTTP/1.1 401 Unauthorized'));
exit(header('HTTP/1.1 429 Too Many Requests'));
}
$error_page = $config['mc_antidos']['error_push_page'];
if ($mcad->rate_limit_site_request) {