Skip to content

Commit

Permalink
Merge pull request YOURLS#1935 from cemeyer2/cemeyer2-proper-http-codes
Browse files Browse the repository at this point in the history
use correct http status code for rate limiting
  • Loading branch information
ozh authored Dec 1, 2017
2 parents daceb96 + 68df396 commit 68734d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
}

Expand Down

0 comments on commit 68734d4

Please sign in to comment.