mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-07 02:24:08 +00:00
Return 429 Too Many Requests for rate limiting
This commit is contained in:
@@ -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 "Your IP has been blocked. \n";
|
||||||
echo CONST_BlockMessage;
|
echo CONST_BlockMessage;
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
Reference in New Issue
Block a user