Skip to content

Commit 170e545

Browse files
committed
get config from env
1 parent df81d61 commit 170e545

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/Config/firewall.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
'enabled' => env('FIREWALL_ENABLED', true),
66

7-
'whitelist' => [],
7+
'whitelist' => [env('FIREWALL_WHITELIST', '')],
88

99
'models' => [
1010
'user' => '\App\User',
@@ -13,28 +13,28 @@
1313
'responses' => [
1414

1515
'block' => [
16-
'view' => null,
17-
'redirect' => null,
18-
'abort' => false,
19-
'code' => 403,
16+
'view' => env('FIREWALL_BLOCK_VIEW', null),
17+
'redirect' => env('FIREWALL_BLOCK_REDIRECT', null),
18+
'abort' => env('FIREWALL_BLOCK_ABORT', false),
19+
'code' => env('FIREWALL_BLOCK_CODE', 403),
2020
],
2121

2222
],
2323

2424
'notifications' => [
2525

2626
'mail' => [
27-
'enabled' => true,
28-
'name' => 'Laravel Firewall',
29-
'from' => '[email protected]',
30-
'to' => ['[email protected]'],
27+
'enabled' => env('FIREWALL_EMAIL_ENABLED', false),
28+
'name' => env('FIREWALL_EMAIL_NAME', 'Laravel Firewall'),
29+
'from' => env('FIREWALL_EMAIL_FROM', '[email protected]'),
30+
'to' => [env('FIREWALL_EMAIL_TO', '[email protected]')],
3131
],
3232

3333
'slack' => [
34-
'enabled' => false,
35-
'from' => 'Laravel Firewall',
36-
'to' => '#my-channel',
37-
'emoji' => ':fire:',
34+
'enabled' => env('FIREWALL_SLACK_ENABLED', false),
35+
'from' => env('FIREWALL_SLACK_FROM', 'Laravel Firewall'),
36+
'to' => env('FIREWALL_SLACK_TO', '#my-channel'),
37+
'emoji' => env('FIREWALL_SLACK_EMOJI', ':fire:'),
3838
],
3939

4040
],

0 commit comments

Comments
 (0)