Skip to content

Commit

Permalink
ignore register throttle for testing env
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragchhatrala committed Dec 10, 2024
1 parent e23c081 commit 76a7840
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ class RegisterController extends Controller
public function __construct()
{
$this->middleware('guest');
$this->middleware('throttle:5,1')->only('register'); // 5 attempts per minute
$this->middleware('throttle:30,60')->only('register'); // 30 attempts per hour
if (app()->environment() !== 'testing') {
$this->middleware('throttle:5,1')->only('register'); // 5 attempts per minute
$this->middleware('throttle:30,60')->only('register'); // 30 attempts per hour
}
}

/**
Expand Down

0 comments on commit 76a7840

Please sign in to comment.