]> BookStack Code Mirror - bookstack/blob - app/Http/Middleware/ThrottleApiRequests.php
Merge pull request #5668 from bumperbox/patch-1
[bookstack] / app / Http / Middleware / ThrottleApiRequests.php
1 <?php
2
3 namespace BookStack\Http\Middleware;
4
5 use Illuminate\Routing\Middleware\ThrottleRequests as Middleware;
6
7 class ThrottleApiRequests extends Middleware
8 {
9     /**
10      * Resolve the number of attempts if the user is authenticated or not.
11      */
12     protected function resolveMaxAttempts($request, $maxAttempts): int
13     {
14         return (int) config('api.requests_per_minute');
15     }
16 }
Morty Proxy This is a proxified and sanitized view of the page, visit original site.