11<?php
22
33return [
4+ /*
5+ |--------------------------------------------------------------------------
6+ | Default Action
7+ |--------------------------------------------------------------------------
8+ |
9+ | By default, if the request matches none of the defined derivatives we can
10+ | either deny or allow the user. You can specify this default action here.
11+ |
12+ */
413
5- 'repositories ' => [
6- 'default ' => 'config ' ,
14+ 'default_action ' => 'deny ' ,
15+
16+ /*
17+ |--------------------------------------------------------------------------
18+ | Directives
19+ |--------------------------------------------------------------------------
20+ |
21+ | Directives specify which groups of addresses are allowed or denied access.
22+ | A directive consists of a list name and an action to take if an address exists
23+ | within that list. Directives are processed sequentially, the result of the first
24+ | matched directive will be returned. By default, the blacklist is processed before
25+ | the whitelist, if an address was in both lists it would denied as the first
26+ | directive to be processed is the blacklist. You can reorder the directives to
27+ | suit your needs.
28+ |
29+ | You can create as many directives as you would like, by default there are two
30+ | whitelist & blacklist.
31+ |
32+ */
33+
34+ 'directives ' => [
35+ 'blacklist ' => 'deny ' ,
36+ 'whitelist ' => 'allow ' ,
37+ ],
738
8- 'configuration ' => [
39+ /*
40+ |--------------------------------------------------------------------------
41+ | List Repositories
42+ |--------------------------------------------------------------------------
43+ |
44+ | Out of the box the package supports loading address lists from configuration
45+ | or the database. The default is configuration, you may configure whitelisted
46+ | or blacklisted addresses at the bottom of this file.
47+ |
48+ */
49+
50+ 'default_repository ' => 'config ' ,
51+
52+ 'repositories ' => [
953
10- ' eloquent ' => [
11- ' model ' => null ,
12- ]
54+ ' config ' => [
55+ ' key ' => ' ip_auth ' ,
56+ ],
1357
58+ 'database ' => [
59+ 'connection ' => null ,
60+ 'table ' => 'ip_auth_access_list ' ,
1461 ]
15- ],
1662
17- 'default ' => 'deny ' ,
18-
19- 'directives ' => [
20- 'address_whitelisted ' => 'allow ' ,
21- 'address_blacklisted ' => 'deny ' ,
2263 ],
2364
24- 'whitelist ' => [
25- //'127.0.0.1',
26- //192.168.1.*
27- //192.168.1/24
28- //192.168.1.1/255.255.255.0
29- //192.168.1.1-192.168.1.10
30- //2001:cdba:0000:0000:0000:0000:3257:*
31- ],
65+ /*
66+ |--------------------------------------------------------------------------
67+ | Configuration Based Address Lists
68+ |--------------------------------------------------------------------------
69+ |
70+ | If you decide to use the default configuration list repository, you can
71+ | simply add the addresses you wish to control below.
72+ |
73+ */
74+
75+ 'addresses ' => [
3276
33- 'blacklist ' => [
34- //'127.0.0.1',
35- //'192.168.99.1',
36- //192.168.1.*
37- //192.168.1/24
38- //192.168.1.1/255.255.255.0
39- //192.168.1.1-192.168.1.10
40- //2001:cdba:0000:0000:0000:0000:3257:*
77+ 'whitelist ' => [
78+ //'127.0.0.1',
79+ //'192.168.1.*',
80+ //192.168.1.0/24
81+ //192.168.1.1 255.255.255.0
82+ //192.168.1.1-192.168.1.10
83+ //2001:cdba:0000:0000:0000:0000:3257:*
84+ ],
85+
86+ 'blacklist ' => [
87+ //'127.0.0.1',
88+ //'192.168.99.1',
89+ //192.168.1.*
90+ //192.168.1.0/24
91+ //192.168.1.1 255.255.255.0
92+ //192.168.1.1-192.168.1.10
93+ //2001:cdba:0000:0000:0000:0000:3257:*
94+ ],
95+
96+ 'custom_list ' => [
97+ // place custom address definitions here.
98+ ]
4199 ]
42100];
0 commit comments