File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -347,6 +347,7 @@ MAGICLINK_DELETE_MASSIVE=false
347347## Customization
348348
349349### Config
350+
350351To custom this package you can publish the config file:
351352
352353``` bash
@@ -440,12 +441,13 @@ return a `view()`
440441You can limit the number of requests per minute for a magic link. To do this, you need to
441442set the ` MAGICLINK_RATE_LIMIT ` environment variable to the desired value.
442443
443- By default, the rate limit is 100 attempts per minutes. Use ` none ` to disable the rate limit.
444+ By default, the rate limit is disable with value 'none', but you can set a value
445+ to limit the requests. For example, to limit the requests to 100 per minute, set
444446
445447``` bash
446448# .env
447449
448- MAGICLINK_RATE_LIMIT=' none '
450+ MAGICLINK_RATE_LIMIT=100
449451```
450452
451453## Testing
Original file line number Diff line number Diff line change 6868 |
6969 | Here you may specify the number of attempts to rate limit per minutes
7070 |
71- | Default: 100 , if you want to disable rate limit, set as 'none'
71+ | Default: none , if you want to enable rate limit, set as integer
7272 */
73- 'rate_limit ' => env ('MAGICLINK_RATE_LIMIT ' , 100 ),
73+ 'rate_limit ' => env ('MAGICLINK_RATE_LIMIT ' , ' none ' ),
7474
7575 'token ' => [
7676 /*
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function boot()
2626
2727 private function registerRateLimit (): void
2828 {
29- $ rateLimit = config ('magiclink.rate_limit ' , 100 );
29+ $ rateLimit = config ('magiclink.rate_limit ' , ' none ' );
3030
3131 RateLimiter::for (
3232 'magiclink ' ,
You can’t perform that action at this time.
0 commit comments