Skip to content

Commit

Permalink
Merge pull request #6 from ikhsan3adi/upgrade-4.5.1
Browse files Browse the repository at this point in the history
deps: Upgrade codeigniter
  • Loading branch information
ikhsan3adi authored Apr 29, 2024
2 parents eeae7dd + d7c67bd commit 8f66bc3
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 239 deletions.
14 changes: 0 additions & 14 deletions app/Config/Feature.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,6 @@
*/
class Feature extends BaseConfig
{
/**
* Enable multiple filters for a route or not.
*
* If you enable this:
* - CodeIgniter\CodeIgniter::handleRequest() uses:
* - CodeIgniter\Filters\Filters::enableFilters(), instead of enableFilter()
* - CodeIgniter\CodeIgniter::tryToRouteIt() uses:
* - CodeIgniter\Router\Router::getFilters(), instead of getFilter()
* - CodeIgniter\Router\Router::handle() uses:
* - property $filtersInfo, instead of $filterInfo
* - CodeIgniter\Router\RouteCollection::getFiltersForRoute(), instead of getFilterForRoute()
*/
public bool $multipleFilters = false;

/**
* Use improved new auto routing instead of the default legacy version.
*/
Expand Down
15 changes: 12 additions & 3 deletions app/Config/Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

namespace Config;

use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Filters\CSRF;
use CodeIgniter\Filters\DebugToolbar;
use CodeIgniter\Filters\Honeypot;
use CodeIgniter\Filters\InvalidChars;
use CodeIgniter\Filters\SecureHeaders;
use CodeIgniter\Filters\ForceHTTPS;
use CodeIgniter\Filters\PageCache;
use CodeIgniter\Filters\PerformanceMetrics;

class Filters extends BaseConfig
class Filters extends \CodeIgniter\Config\Filters
{
/**
* Configures aliases for Filter classes to
Expand All @@ -21,6 +23,9 @@ class Filters extends BaseConfig
'honeypot' => Honeypot::class,
'invalidchars' => InvalidChars::class,
'secureheaders' => SecureHeaders::class,
'forcehttps' => ForceHTTPS::class,
'pagecache' => PageCache::class,
'performance' => PerformanceMetrics::class,
];

/**
Expand All @@ -32,11 +37,15 @@ class Filters extends BaseConfig
// 'honeypot',
// 'csrf',
// 'invalidchars',
'forcehttps', // Force Global Secure Requests
'pagecache', // Web Page Caching
],
'after' => [
'toolbar',
// 'honeypot',
// 'secureheaders',
'pagecache', // Web Page Caching
'performance', // Performance Metrics
'toolbar', // Debug Toolbar
],
];

Expand Down
Loading

0 comments on commit 8f66bc3

Please sign in to comment.