X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3470abad079927d5ee3b659865a940b5703f8551..f0f6fcf256c83176dbcda0d0fd4fec977ea8a0ad:/lib/init-website.php?ds=inline diff --git a/lib/init-website.php b/lib/init-website.php index e47b73fb..fff33936 100644 --- a/lib/init-website.php +++ b/lib/init-website.php @@ -12,12 +12,6 @@ } if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') exit; - if (CONST_ClosedForIndexing && strpos(CONST_ClosedForIndexingExceptionIPs, ','.$_SERVER["REMOTE_ADDR"].',') === false) - { - echo "Closed for re-indexing..."; - exit; - } - $aBucketKeys = array(); if (isset($_SERVER["HTTP_REFERER"])) $aBucketKeys[] = str_replace('www.','',strtolower(parse_url($_SERVER["HTTP_REFERER"], PHP_URL_HOST))); @@ -54,6 +48,7 @@ if (strpos(CONST_BlockedIPs, ','.$_SERVER["REMOTE_ADDR"].',') !== false || $fBucketVal >= CONST_ConnectionBucket_BlockLimit) { + header("HTTP/1.0 429 Too Many Requests"); echo "Your IP has been blocked. \n"; echo CONST_BlockMessage; exit;