koel/app/Http/Middleware/ThrottleRequests.php

20 lines
540 B
PHP
Raw Normal View History

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
{
public function handle($request, Closure $next, $maxAttempts = 600, $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);
}
}