-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(http): skip throttling for local env (#851)
- Loading branch information
1 parent
5e27dd3
commit ec2ddac
Showing
3 changed files
with
29 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use Closure; | ||
use Illuminate\Routing\Middleware\ThrottleRequests; | ||
|
||
class Throttle extends ThrottleRequests { | ||
|
||
/** | ||
* Handle an incoming request. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @param \Closure $next | ||
* @param int|string $maxAttempts | ||
* @param float|int $decayMinutes | ||
* @param string $prefix | ||
* @return \Symfony\Component\HttpFoundation\Response | ||
* | ||
* @throws \Illuminate\Http\Exceptions\ThrottleRequestsException | ||
*/ | ||
public function handle($request, Closure $next, $maxAttempts = 60, $decayMinutes = 1, $prefix = '') { | ||
if (config('app.env') === 'local') { | ||
return $next($request); | ||
} | ||
return parent::handle($request, $next, $maxAttempts, $decayMinutes, $prefix); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.