2022-06-10 10:47:46 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
|
|
|
|
use Closure;
|
|
|
|
use Illuminate\Routing\Middleware\ThrottleRequests as BaseThrottleRequests;
|
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
|
|
|
|
class ThrottleRequests extends BaseThrottleRequests
|
|
|
|
{
|
2022-07-30 16:06:20 +00:00
|
|
|
public function handle($request, Closure $next, $maxAttempts = 300, $decayMinutes = 1, $prefix = ''): Response
|
2022-06-10 10:47:46 +00:00
|
|
|
{
|
|
|
|
if (app()->environment('production')) {
|
|
|
|
return parent::handle($request, $next, $maxAttempts, $decayMinutes, $prefix);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $next($request);
|
|
|
|
}
|
|
|
|
}
|