File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 13
13
php_code_sniffer :
14
14
config :
15
15
standard : " PSR2"
16
- php_cpd : true
16
+ php_cpd : false # PHP Copy/Paste Detector and PHP Code Similarity Analyzer cannot both be used simultaneously
17
17
php_mess_detector : true
18
18
php_pdepend : true
19
19
sensiolabs_security_checker : true
Original file line number Diff line number Diff line change 12
12
// 'ip' => '\App\Models\YourIpModel',
13
13
],
14
14
15
+ 'unblockip_cron ' => [
16
+ 'enabled ' => boolval (env ('FIREWALL_UNBLOCKIP_ENABLED ' , true )),
17
+ 'cron ' => env ('FIREWALL_UNBLOCKIP_CRON ' , '* * * * * ' ),
18
+ ],
15
19
'responses ' => [
16
20
17
21
'block ' => [
Original file line number Diff line number Diff line change @@ -106,8 +106,12 @@ public function registerCommands()
106
106
{
107
107
$ this ->commands (UnblockIp::class);
108
108
109
- $ this ->app ->booted (function () {
110
- app (Schedule::class)->command ('firewall:unblockip ' )->everyMinute ();
111
- });
109
+ if (config ('firewall.unblockip_cron.enabled ' , true )) {
110
+ $ this ->app ->booted (function () {
111
+ app (Schedule::class)
112
+ ->command ('firewall:unblockip ' )
113
+ ->cron (config ('firewall.unblockip_cron.cron ' , '* * * * * ' ));
114
+ });
115
+ }
112
116
}
113
117
}
You can’t perform that action at this time.
0 commit comments