/
Filters.php
43 lines (38 loc) · 1.3 KB
/
Filters.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
<?php namespace Config;
use CodeIgniter\Config\BaseConfig;
class Filters extends BaseConfig
{
// Makes reading things below nicer,
// and simpler to change out script that's used.
public $aliases = [
'csrf' => \CodeIgniter\Filters\CSRF::class,
'toolbar' => \CodeIgniter\Filters\DebugToolbar::class,
'honeypot' => \CodeIgniter\Filters\Honeypot::class,
'installedVerification' => \NodCMS\Core\Filters\InstalledVerification::class,
'urlLocale' => \NodCMS\Core\Filters\UrlLocale::class,
'identityVerification' => \NodCMS\Core\Filters\IdentityVerification::class,
];
// Always applied before every request
public $globals = [
'before' => [
'installedVerification',
//'honeypot'
'csrf',
],
'after' => [
'toolbar',
//'honeypot'
],
];
// Works on all of a particular HTTP method
// (GET, POST, etc) as BEFORE filters only
// like: 'post' => ['CSRF', 'throttle'],
public $methods = [];
// List filter aliases and any before/after uri patterns
// that they should run on, like:
// 'isLoggedIn' => ['before' => ['account/*', 'profiles/*']],
public $filters = [
'urlLocale' => ['before' => ['[a-z]{2}', '[a-z]{2}/*'], 'after' => []],
'identityVerification' => ['before' => ['admin', 'admin/*', 'admin-*', 'user/*'], 'after' => []],
];
}