mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-09-10 12:39:38 +02:00
- add .editorconfig file - format all files to comply with castopod's coding style - switch parsedown dependency with commonmark library to better follow commonmark spec for markdown - add prettier command to format all project files at once closes #16
51 lines
1.3 KiB
PHP
51 lines
1.3 KiB
PHP
<?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,
|
|
'login' => \Myth\Auth\Filters\LoginFilter::class,
|
|
'role' => \Myth\Auth\Filters\RoleFilter::class,
|
|
'permission' => \App\Filters\Permission::class,
|
|
];
|
|
|
|
// Always applied before every request
|
|
public $globals = [
|
|
'before' => [
|
|
//'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 = [];
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
|
|
$this->filters = [
|
|
'login' => ['before' => [config('App')->adminGateway . '*']],
|
|
];
|
|
}
|
|
}
|