Make rate limit configurable; closes #1695
This commit is contained in:
parent
fde8465f35
commit
e95a532da9
4 changed files with 32 additions and 5 deletions
|
@ -38,11 +38,17 @@ class RouteServiceProvider extends ServiceProvider
|
|||
->namespace($this->namespace . '\Server')
|
||||
->group(base_path('routes/server.php'));
|
||||
|
||||
Route::middleware(['api'])->prefix('/api/application')
|
||||
Route::middleware([
|
||||
sprintf('throttle:%s,%s', config('http.rate_limit.application'), config('http.rate_limit.application_period')),
|
||||
'api',
|
||||
])->prefix('/api/application')
|
||||
->namespace($this->namespace . '\Api\Application')
|
||||
->group(base_path('routes/api-application.php'));
|
||||
|
||||
Route::middleware(['client-api'])->prefix('/api/client')
|
||||
Route::middleware([
|
||||
sprintf('throttle:%s,%s', config('http.rate_limit.client'), config('http.rate_limit.client_period')),
|
||||
'client-api',
|
||||
])->prefix('/api/client')
|
||||
->namespace($this->namespace . '\Api\Client')
|
||||
->group(base_path('routes/api-client.php'));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue