-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to throttle by hour or day as well as weeks
- Loading branch information
Showing
3 changed files
with
38 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
<?php | ||
|
||
return [ | ||
/** | ||
* Number of attempts permitted to a single | ||
* IP address before being throttled. | ||
*/ | ||
'attempt_limit' => 10, | ||
'expiry_weeks' => 1 | ||
|
||
/** | ||
* The datetime metric to use for expirations | ||
* Available options are hour, day or week. | ||
*/ | ||
'expiry_metric' => 'week', | ||
|
||
/** | ||
* The number of hours, days or weeks to | ||
* keep a throttle valid for. | ||
*/ | ||
'expiry_timelimit' => 1 | ||
]; |
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
This could be done more elegantly, feedback welcomed!