Created
June 16, 2020 13:43
-
-
Save prolongservices/de435e73d3f4a0ceb5aa9ec464bad573 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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, | |
| 'dateFilter' => \App\Filters\DateFilter::class, | |
| 'authFilter' => \App\Filters\AuthFilter::class, | |
| ]; | |
| // Always applied before every request | |
| public $globals = [ | |
| 'before' => [ | |
| 'honeypot', | |
| // 'csrf', | |
| 'dateFilter', | |
| //'authFilter' => ['except' => ['login']] | |
| ], | |
| 'after' => [ | |
| 'toolbar', | |
| 'honeypot', | |
| 'dateFilter' | |
| ], | |
| ]; | |
| // 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 = []; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment