X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/463ef857c8eec827f60bb203df5211c6c7755b0f..9f880c367c4a9fd8a2950011eeba22c77ab0c914:/website/reverse.php diff --git a/website/reverse.php b/website/reverse.php index 33e6cd5e..c348659e 100755 --- a/website/reverse.php +++ b/website/reverse.php @@ -4,6 +4,22 @@ require_once(dirname(dirname(__FILE__)).'/lib/init-website.php'); require_once(CONST_BasePath.'/lib/log.php'); + if (preg_match(CONST_BlockedUserAgents, $_SERVER["HTTP_USER_AGENT"]) > 0) + { + $fLoadAvg = getLoadAverage(); + if ($fLoadAvg >= CONST_BlockReverseMaxLoad) { + header('HTTP/1.0 403 Forbidden'); + header('Content-type: text/html; charset=utf-8'); + echo "