]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/init-website.php
Merge pull request #395 from mtmail/php7-support
[nominatim.git] / lib / init-website.php
index e47b73fb4bfa0d29b53f19c0c481e70d460a061c..a34e4c82787ae1dee4f77d5431a66376aeb077dc 100644 (file)
@@ -13,7 +13,7 @@
        if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') exit;
 
        if (CONST_ClosedForIndexing && strpos(CONST_ClosedForIndexingExceptionIPs, ','.$_SERVER["REMOTE_ADDR"].',') === false)
        if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') exit;
 
        if (CONST_ClosedForIndexing && strpos(CONST_ClosedForIndexingExceptionIPs, ','.$_SERVER["REMOTE_ADDR"].',') === false)
-       {
+       {
                echo "Closed for re-indexing...";
                exit;
        }
                echo "Closed for re-indexing...";
                exit;
        }
@@ -54,6 +54,7 @@
 
        if (strpos(CONST_BlockedIPs, ','.$_SERVER["REMOTE_ADDR"].',') !== false || $fBucketVal >= CONST_ConnectionBucket_BlockLimit)
        {
 
        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;
                echo "Your IP has been blocked. \n";
                echo CONST_BlockMessage;
                exit;