BookStack/app/Http/Middleware/ThrottleApiRequests.php

17 lines
391 B
PHP
Raw Permalink Normal View History

<?php
namespace BookStack\Http\Middleware;
use Illuminate\Routing\Middleware\ThrottleRequests as Middleware;
class ThrottleApiRequests extends Middleware
{
/**
* Resolve the number of attempts if the user is authenticated or not.
*/
protected function resolveMaxAttempts($request, $maxAttempts): int
{
return (int) config('api.requests_per_minute');
}
2021-03-07 17:24:05 -05:00
}