mirror of
				https://github.com/BookStackApp/BookStack.git
				synced 2025-10-31 03:50:27 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			387 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			387 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?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)
 | |
|     {
 | |
|         return (int) config('api.requests_per_minute');
 | |
|     }
 | |
| 
 | |
| } |