Skip to content

Commit

Permalink
Merge pull request #59 from ikhsan3adi/Bump-codeigniter-to-4.5.1
Browse files Browse the repository at this point in the history
Upgrade to 4.5.1
  • Loading branch information
ikhsan3adi authored Apr 22, 2024
2 parents a9d6ecc + cacf9a8 commit ab8b4a2
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 257 deletions.
17 changes: 9 additions & 8 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# ENVIRONMENT
#--------------------------------------------------------------------

CI_ENVIRONMENT = production
; CI_ENVIRONMENT = production
CI_ENVIRONMENT = development

#--------------------------------------------------------------------
# APP
Expand All @@ -38,13 +39,13 @@ database.default.DBDriver = MySQLi
database.default.DBPrefix =
database.default.port = 3306

# database.tests.hostname = localhost
# database.tests.database = ci4_test
# database.tests.username = root
# database.tests.password = root
# database.tests.DBDriver = MySQLi
# database.tests.DBPrefix =
# database.tests.port = 3306
database.tests.hostname = 127.0.0.1
database.tests.database = db_absensi_test
database.tests.username = root
database.tests.password = root
database.tests.DBDriver = MySQLi
database.tests.DBPrefix =
database.tests.port = 3306

#--------------------------------------------------------------------
# CONTENT SECURITY POLICY
Expand Down
26 changes: 20 additions & 6 deletions app/Config/Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

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;

class Filters extends BaseConfig
class Filters extends \CodeIgniter\Config\Filters
{
/**
* Configures aliases for Filter classes to
Expand All @@ -21,9 +20,12 @@ class Filters extends BaseConfig
'honeypot' => Honeypot::class,
'invalidchars' => InvalidChars::class,
'secureheaders' => SecureHeaders::class,
'login' => \Myth\Auth\Filters\LoginFilter::class,
'role' => \Myth\Auth\Filters\RoleFilter::class,
'permission' => \Myth\Auth\Filters\PermissionFilter::class,
'login' => \Myth\Auth\Filters\LoginFilter::class,
'role' => \Myth\Auth\Filters\RoleFilter::class,
'permission' => \Myth\Auth\Filters\PermissionFilter::class,
'forcehttps' => \CodeIgniter\Filters\ForceHTTPS::class,
'pagecache' => \CodeIgniter\Filters\PageCache::class,
'performance' => \CodeIgniter\Filters\PerformanceMetrics::class,
];

/**
Expand All @@ -38,7 +40,7 @@ class Filters extends BaseConfig
// 'invalidchars',
],
'after' => [
'toolbar',
// 'toolbar',
// 'honeypot',
// 'secureheaders',
],
Expand Down Expand Up @@ -67,4 +69,16 @@ class Filters extends BaseConfig
public array $filters = [
'login' => ['before' => ['admin/', 'admin/*', 'register/']]
];

public array $required = [
'before' => [
'forcehttps', // Force Global Secure Requests
'pagecache', // Web Page Caching
],
'after' => [
'pagecache', // Web Page Caching
'performance', // Performance Metrics
'toolbar', // Debug Toolbar
],
];
}
Loading

0 comments on commit ab8b4a2

Please sign in to comment.