From 8ecd32b7dd22a38c30b119d156d5bec430f14ceb Mon Sep 17 00:00:00 2001 From: Brian Quinion Date: Thu, 23 Jan 2014 16:47:56 +0000 Subject: [PATCH] Return 429 Too Many Requests for rate limiting --- lib/init-website.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/init-website.php b/lib/init-website.php index e47b73fb..6db83988 100644 --- a/lib/init-website.php +++ b/lib/init-website.php @@ -54,6 +54,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;