1 | <?php |
||
2 | /** |
||
3 | * Configuration file of firewall package. |
||
4 | * |
||
5 | * @author Someshwer<[email protected]> |
||
6 | * Date: 13-10-2018 |
||
7 | */ |
||
8 | return [ |
||
9 | |||
10 | /** |
||
11 | * It enables or disables blacklist. |
||
12 | * Set it to true if you want to enable blacklist otherwise, set it false. |
||
13 | */ |
||
14 | 'enable_blacklist' => true, |
||
15 | |||
16 | /** |
||
17 | * It enables or disables whitelist. |
||
18 | * Set it to true if you want to enable whitelist otherwise, set it false. |
||
19 | */ |
||
20 | 'enable_whitelist' => false, |
||
21 | |||
22 | /** |
||
23 | * Note:: If both options enabled means 'enable_blacklist', and |
||
24 | * 'enable_whitelist' both set true, in that case only blacklist will be considered. |
||
25 | */ |
||
26 | |||
27 | /** |
||
28 | * Add ip addresses those you want to black. |
||
29 | */ |
||
30 | 'blacklist' => [ |
||
31 | '121.2.5.88', '121.2.5.89', '121.2.5.90', |
||
32 | ], |
||
33 | |||
34 | /** |
||
35 | * Add ip addresses those you want to whitelist. |
||
36 | */ |
||
37 | 'whitelist' => [ |
||
38 | '121.2.5.92', '121.2.5.93', '121.2.5.94', |
||
39 | ], |
||
40 | |||
41 | /** |
||
42 | * Add ip addresses those you want to accept even if they are in blacklist. |
||
43 | */ |
||
44 | 'accept' => [ |
||
45 | '192.0.0.1', '192.0.0.2', |
||
46 | ], |
||
47 | |||
48 | /** |
||
49 | * Add ip addresses those you want reject even if they are in whitelist. |
||
50 | */ |
||
51 | 'reject' => [ |
||
52 | '192.0.0.3', '192.0.0.4', '192.0.0.5', |
||
53 | ], |
||
54 | |||
55 | /** |
||
56 | * Redirects you to this url if request ip is blacklisted or not whitelisted. |
||
57 | * |
||
58 | * Note:: Here you can also specify your own custom url |
||
59 | */ |
||
60 | 'redirect_url' => '/firewall/unauthorized/redirect', |
||
61 | |||
62 | /** |
||
63 | * This enables request logging mechanism. |
||
64 | * If set tu TRUE the specified route request will be captured |
||
65 | * and stored in firewall_log table along with white and black list data. |
||
66 | */ |
||
67 | 'firewall_log' => true, |
||
68 | |||
69 | /** |
||
70 | * This enables request logging mechanism. |
||
71 | * If set tu TRUE every incoming request will be captured |
||
72 | * and stored in firewall_requests_log table. |
||
73 | */ |
||
74 | 'log_request' => true, |
||
75 | |||
76 | /** |
||
77 | * Enables firewall log pagination if set to TRUE. |
||
78 | * To disable pagination set it to FALSE. |
||
79 | */ |
||
80 | 'firewall_log_pagination' => [ |
||
81 | 'enabled' => true, |
||
82 | 'per_page' => 20, |
||
83 | ], |
||
84 | |||
85 | /** |
||
86 | * Enables firewall requests log pagination if set to TRUE. |
||
87 | * To disable pagination set it to FALSE. |
||
88 | */ |
||
89 | 'firewall_requests_log_pagination' => [ |
||
90 | 'enabled' => true, |
||
91 | 'per_page' => 20, |
||
92 | ], |
||
93 | |||
94 | /** |
||
95 | * Enables exceptions to be logged into database table called 'exception_log'. |
||
96 | * |
||
97 | * To enable this feature set it to TRUE |
||
98 | * To disable this feature set it to FALSE |
||
99 | * |
||
100 | * If set to FALSE exceptions will not be tracked/logged. |
||
101 | */ |
||
102 | 'log_exceptions' => true, |
||
103 | |||
104 | /** |
||
105 | * Enables pagination for exception log data if set to TRUE. |
||
106 | * To disable pagination set it to FALSE. |
||
107 | */ |
||
108 | 'exception_log_pagination' => [ |
||
109 | 'enabled' => true, |
||
110 | 'per_page' => 20, |
||
111 | ], |
||
112 | |||
113 | /** |
||
114 | * It notifies exceptions via email. An email with exception details will be sent to the |
||
115 | * configured email id when ever an exception occurred in the application. |
||
116 | * To enable this feature set this option to TRUE otherwise set to FALSE. |
||
117 | */ |
||
118 | 'notify_exceptions' => [ |
||
119 | 'via_email' => true, |
||
120 | 'mail_from' => env('EXCEPTION_NOTIFICATION_EMAIL_FROM', '[email protected]'), |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
121 | 'mail_to' => env('EXCEPTION_NOTIFICATION_EMAIL_TO', '[email protected]'), |
||
122 | 'subject' => 'Whoops! An exception occurred in the Application! - ('.env('APP_NAME', 'LARAVEL').')', |
||
123 | ], |
||
124 | |||
125 | ]; |
||
126 |