Permalink
Browse files

Return 429 Too Many Requests for rate limiting

  • Loading branch information...
twain47 committed Jan 23, 2014
1 parent f56cae4 commit 8ecd32b7dd22a38c30b119d156d5bec430f14ceb
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/init-website.php
View
@@ -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;

0 comments on commit 8ecd32b

Please sign in to comment.