BookStackApp/BookStack

View on GitHub
app/Http/Middleware/ThrottleApiRequests.php

Summary

Maintainability
A
0 mins
Test Coverage
<?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');
    }
}