mirror of
https://github.com/koel/koel
synced 2025-01-05 09:18:51 +00:00
20 lines
539 B
PHP
20 lines
539 B
PHP
|
<?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 = 60, $decayMinutes = 1, $prefix = ''): Response
|
||
|
{
|
||
|
if (app()->environment('production')) {
|
||
|
return parent::handle($request, $next, $maxAttempts, $decayMinutes, $prefix);
|
||
|
}
|
||
|
|
||
|
return $next($request);
|
||
|
}
|
||
|
}
|