This repository has been archived by the owner on Jan 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
117 lines (104 loc) · 3.08 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?php
use Pagekit\Application;
use Spqr\Security\Event\AuthListener;
use Spqr\Security\Event\EntryListener;
use Spqr\Security\Event\RouteListener;
use Spqr\Security\Event\CommentListener;
return [
'name' => 'spqr/security',
'type' => 'extension',
'main' => function (Application $app) {
},
'autoload' => [
'Spqr\\Security\\' => 'src',
],
'routes' => [
'/security' => [
'name' => '@security',
'controller' => ['Spqr\\Security\\Controller\\BanController'],
],
'/api/security' => [
'name' => '@security/api',
'controller' => [
'Spqr\\Security\\Controller\\BanApiController',
],
],
],
'widgets' => [],
'menu' => [
'security' => [
'label' => 'Security',
'url' => '@security/ban',
'active' => '@security/ban*',
'icon' => 'spqr/security:icon.svg',
],
'security: ban' => [
'parent' => 'security',
'label' => 'Bans',
'icon' => 'spqr/security:icon.svg',
'url' => '@security/ban',
'access' => 'security: manage bans',
'active' => '@security/ban*',
],
'security: settings' => [
'parent' => 'security',
'label' => 'Settings',
'url' => '@security/settings',
'access' => 'security: manage settings',
],
],
'permissions' => [
'security: manage settings' => [
'title' => 'Manage settings',
],
'security: manage bans' => [
'title' => 'Manage bans',
],
],
'settings' => '@security/settings',
'resources' => [
'spqr/security:' => '',
],
'config' => [
'items_per_page' => 20,
'jails' => [
'login' => [
'enabled' => true,
'attempts' => 3,
],
'unauthorized' => [
'enabled' => false,
'attempts' => 3,
],
'forbidden' => [
'enabled' => false,
'attempts' => 3,
],
'honeypot' => [
'enabled' => true,
'attempts' => 3,
'honeypots' => [
'wp-login.php',
'wp-admin',
'xmlrpc.php',
'index.php?option=',
],
],
'spam' => [
'enabled' => true,
'attempts' => 3,
],
],
'whitelist' => ['127.0.0.1'],
],
'events' => [
'boot' => function ($event, $app) {
$app->subscribe(new AuthListener, new EntryListener,
new RouteListener, new CommentListener);
},
'site' => function ($event, $app) {
},
'view.scripts' => function ($event, $scripts) use ($app) {
},
],
];