Permalink
Browse files

Merge pull request #1935 from cemeyer2/cemeyer2-proper-http-codes

use correct http status code for rate limiting
  • Loading branch information...
ozh committed Dec 1, 2017
2 parents daceb96 + 68df396 commit 68734d43e55aa224e384151854663bee25ffb7ea
Showing with 1 addition and 1 deletion.
  1. +1 −1 includes/functions.php
View
@@ -1378,7 +1378,7 @@ function yourls_check_IP_flood( $ip = '' ) {
if( ( $now - $then ) <= YOURLS_FLOOD_DELAY_SECONDS ) {
// Flood!
yourls_do_action( 'ip_flood', $ip, $now - $then );
yourls_die( yourls__( 'Too many URLs added too fast. Slow down please.' ), yourls__( 'Forbidden' ), 403 );
yourls_die( yourls__( 'Too many URLs added too fast. Slow down please.' ), yourls__( 'Too Many Requests' ), 429 );
}
}

0 comments on commit 68734d4

Please sign in to comment.