]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/init-website.php
Merge remote-tracking branch 'origin/master' into osmline
[nominatim.git] / lib / init-website.php
index e47b73fb4bfa0d29b53f19c0c481e70d460a061c..fff33936dc6d688b4ce4d54cfe62bd585221661c 100644 (file)
        }
        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;