daemon-idc init
This commit is contained in:
parent
404a7e9be6
commit
e80091864b
@ -93,7 +93,9 @@ class App extends BaseConfig
|
|||||||
* strings (like currency markers, numbers, etc), that your program
|
* strings (like currency markers, numbers, etc), that your program
|
||||||
* should run under for this request.
|
* should run under for this request.
|
||||||
*/
|
*/
|
||||||
|
//choi.jh
|
||||||
public string $defaultLocale = 'ko';
|
public string $defaultLocale = 'ko';
|
||||||
|
//choi.jh
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
|
|||||||
@ -6,6 +6,22 @@ use CodeIgniter\Config\BaseConfig;
|
|||||||
|
|
||||||
class CURLRequest extends BaseConfig
|
class CURLRequest extends BaseConfig
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* CURLRequest Share Connection Options
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Share connection options between requests.
|
||||||
|
*
|
||||||
|
* @var list<int>
|
||||||
|
*
|
||||||
|
* @see https://www.php.net/manual/en/curl.constants.php#constant.curl-lock-data-connect
|
||||||
|
*/
|
||||||
|
public array $shareConnectionOptions = [
|
||||||
|
CURL_LOCK_DATA_CONNECT,
|
||||||
|
CURL_LOCK_DATA_DNS,
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* CURLRequest Share Options
|
* CURLRequest Share Options
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
namespace Config;
|
namespace Config;
|
||||||
|
|
||||||
use CodeIgniter\Cache\CacheInterface;
|
use CodeIgniter\Cache\CacheInterface;
|
||||||
|
use CodeIgniter\Cache\Handlers\ApcuHandler;
|
||||||
use CodeIgniter\Cache\Handlers\DummyHandler;
|
use CodeIgniter\Cache\Handlers\DummyHandler;
|
||||||
use CodeIgniter\Cache\Handlers\FileHandler;
|
use CodeIgniter\Cache\Handlers\FileHandler;
|
||||||
use CodeIgniter\Cache\Handlers\MemcachedHandler;
|
use CodeIgniter\Cache\Handlers\MemcachedHandler;
|
||||||
@ -112,13 +113,23 @@ class Cache extends BaseConfig
|
|||||||
* Your Redis server can be specified below, if you are using
|
* Your Redis server can be specified below, if you are using
|
||||||
* the Redis or Predis drivers.
|
* the Redis or Predis drivers.
|
||||||
*
|
*
|
||||||
* @var array{host?: string, password?: string|null, port?: int, timeout?: int, database?: int}
|
* @var array{
|
||||||
|
* host?: string,
|
||||||
|
* password?: string|null,
|
||||||
|
* port?: int,
|
||||||
|
* timeout?: int,
|
||||||
|
* async?: bool,
|
||||||
|
* persistent?: bool,
|
||||||
|
* database?: int
|
||||||
|
* }
|
||||||
*/
|
*/
|
||||||
public array $redis = [
|
public array $redis = [
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'password' => null,
|
'password' => null,
|
||||||
'port' => 6379,
|
'port' => 6379,
|
||||||
'timeout' => 0,
|
'timeout' => 0,
|
||||||
|
'async' => false, // specific to Predis and ignored by the native Redis extension
|
||||||
|
'persistent' => false,
|
||||||
'database' => 0,
|
'database' => 0,
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -133,6 +144,7 @@ class Cache extends BaseConfig
|
|||||||
* @var array<string, class-string<CacheInterface>>
|
* @var array<string, class-string<CacheInterface>>
|
||||||
*/
|
*/
|
||||||
public array $validHandlers = [
|
public array $validHandlers = [
|
||||||
|
'apcu' => ApcuHandler::class,
|
||||||
'dummy' => DummyHandler::class,
|
'dummy' => DummyHandler::class,
|
||||||
'file' => FileHandler::class,
|
'file' => FileHandler::class,
|
||||||
'memcached' => MemcachedHandler::class,
|
'memcached' => MemcachedHandler::class,
|
||||||
@ -159,4 +171,28 @@ class Cache extends BaseConfig
|
|||||||
* @var bool|list<string>
|
* @var bool|list<string>
|
||||||
*/
|
*/
|
||||||
public $cacheQueryString = false;
|
public $cacheQueryString = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Web Page Caching: Cache Status Codes
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* HTTP status codes that are allowed to be cached. Only responses with
|
||||||
|
* these status codes will be cached by the PageCache filter.
|
||||||
|
*
|
||||||
|
* Default: [] - Cache all status codes (backward compatible)
|
||||||
|
*
|
||||||
|
* Recommended: [200] - Only cache successful responses
|
||||||
|
*
|
||||||
|
* You can also use status codes like:
|
||||||
|
* [200, 404, 410] - Cache successful responses and specific error codes
|
||||||
|
* [200, 201, 202, 203, 204] - All 2xx successful responses
|
||||||
|
*
|
||||||
|
* WARNING: Using [] may cache temporary error pages (404, 500, etc).
|
||||||
|
* Consider restricting to [200] for production applications to avoid
|
||||||
|
* caching errors that should be temporary.
|
||||||
|
*
|
||||||
|
* @var list<int>
|
||||||
|
*/
|
||||||
|
public array $cacheStatusCodes = [];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,6 +78,7 @@ defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
|
|||||||
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
|
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
|
||||||
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
|
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
|
||||||
|
|
||||||
|
//choi.jh
|
||||||
define("KEYWORD", '일본IDC 일본서버 일본 서버 일본호스팅 서버호스팅 디도스 공격 해외 호스팅 DDOS 방어 ddos 의뢰 디도스 보안 일본 단독서버 가상서버');
|
define("KEYWORD", '일본IDC 일본서버 일본 서버 일본호스팅 서버호스팅 디도스 공격 해외 호스팅 DDOS 방어 ddos 의뢰 디도스 보안 일본 단독서버 가상서버');
|
||||||
define('LAYOUTS', [
|
define('LAYOUTS', [
|
||||||
'auth' => [
|
'auth' => [
|
||||||
@ -386,3 +387,4 @@ define("BOARD", [
|
|||||||
'REQUESTTASK' => 'requesttask'
|
'REQUESTTASK' => 'requesttask'
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
//choi.jh
|
||||||
@ -30,6 +30,11 @@ class ContentSecurityPolicy extends BaseConfig
|
|||||||
*/
|
*/
|
||||||
public ?string $reportURI = null;
|
public ?string $reportURI = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies a reporting endpoint to which violation reports ought to be sent.
|
||||||
|
*/
|
||||||
|
public ?string $reportTo = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instructs user agents to rewrite URL schemes, changing
|
* Instructs user agents to rewrite URL schemes, changing
|
||||||
* HTTP to HTTPS. This directive is for websites with
|
* HTTP to HTTPS. This directive is for websites with
|
||||||
@ -38,12 +43,12 @@ class ContentSecurityPolicy extends BaseConfig
|
|||||||
public bool $upgradeInsecureRequests = false;
|
public bool $upgradeInsecureRequests = false;
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// Sources allowed
|
// CSP DIRECTIVES SETTINGS
|
||||||
// NOTE: once you set a policy to 'none', it cannot be further restricted
|
// NOTE: once you set a policy to 'none', it cannot be further restricted
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will default to self if not overridden
|
* Will default to `'self'` if not overridden
|
||||||
*
|
*
|
||||||
* @var list<string>|string|null
|
* @var list<string>|string|null
|
||||||
*/
|
*/
|
||||||
@ -56,6 +61,21 @@ class ContentSecurityPolicy extends BaseConfig
|
|||||||
*/
|
*/
|
||||||
public $scriptSrc = 'self';
|
public $scriptSrc = 'self';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies valid sources for JavaScript <script> elements.
|
||||||
|
*
|
||||||
|
* @var list<string>|string
|
||||||
|
*/
|
||||||
|
public array|string $scriptSrcElem = 'self';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies valid sources for JavaScript inline event
|
||||||
|
* handlers and JavaScript URLs.
|
||||||
|
*
|
||||||
|
* @var list<string>|string
|
||||||
|
*/
|
||||||
|
public array|string $scriptSrcAttr = 'self';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists allowed stylesheets' URLs.
|
* Lists allowed stylesheets' URLs.
|
||||||
*
|
*
|
||||||
@ -63,6 +83,21 @@ class ContentSecurityPolicy extends BaseConfig
|
|||||||
*/
|
*/
|
||||||
public $styleSrc = 'self';
|
public $styleSrc = 'self';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies valid sources for stylesheets <link> elements.
|
||||||
|
*
|
||||||
|
* @var list<string>|string
|
||||||
|
*/
|
||||||
|
public array|string $styleSrcElem = 'self';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies valid sources for stylesheets inline
|
||||||
|
* style attributes and `<style>` elements.
|
||||||
|
*
|
||||||
|
* @var list<string>|string
|
||||||
|
*/
|
||||||
|
public array|string $styleSrcAttr = 'self';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines the origins from which images can be loaded.
|
* Defines the origins from which images can be loaded.
|
||||||
*
|
*
|
||||||
@ -145,6 +180,11 @@ class ContentSecurityPolicy extends BaseConfig
|
|||||||
*/
|
*/
|
||||||
public $manifestSrc;
|
public $manifestSrc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var list<string>|string
|
||||||
|
*/
|
||||||
|
public array|string $workerSrc = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limits the kinds of plugins a page may invoke.
|
* Limits the kinds of plugins a page may invoke.
|
||||||
*
|
*
|
||||||
@ -160,17 +200,17 @@ class ContentSecurityPolicy extends BaseConfig
|
|||||||
public $sandbox;
|
public $sandbox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nonce tag for style
|
* Nonce placeholder for style tags.
|
||||||
*/
|
*/
|
||||||
public string $styleNonceTag = '{csp-style-nonce}';
|
public string $styleNonceTag = '{csp-style-nonce}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nonce tag for script
|
* Nonce placeholder for script tags.
|
||||||
*/
|
*/
|
||||||
public string $scriptNonceTag = '{csp-script-nonce}';
|
public string $scriptNonceTag = '{csp-script-nonce}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace nonce tag automatically
|
* Replace nonce tag automatically?
|
||||||
*/
|
*/
|
||||||
public bool $autoNonce = true;
|
public bool $autoNonce = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,6 +30,11 @@ class Email extends BaseConfig
|
|||||||
*/
|
*/
|
||||||
public string $SMTPHost = '';
|
public string $SMTPHost = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Which SMTP authentication method to use: login, plain
|
||||||
|
*/
|
||||||
|
public string $SMTPAuthMethod = 'login';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP Username
|
* SMTP Username
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -23,6 +23,23 @@ class Encryption extends BaseConfig
|
|||||||
*/
|
*/
|
||||||
public string $key = '';
|
public string $key = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Previous Encryption Keys
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* When rotating encryption keys, add old keys here to maintain ability
|
||||||
|
* to decrypt data encrypted with previous keys. Encryption always uses
|
||||||
|
* the current $key. Decryption tries current key first, then falls back
|
||||||
|
* to previous keys if decryption fails.
|
||||||
|
*
|
||||||
|
* In .env file, use comma-separated string:
|
||||||
|
* encryption.previousKeys = hex2bin:9be8c64fcea509867...,hex2bin:3f5a1d8e9c2b7a4f6...
|
||||||
|
*
|
||||||
|
* @var list<string>|string
|
||||||
|
*/
|
||||||
|
public array|string $previousKeys = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Encryption Driver to Use
|
* Encryption Driver to Use
|
||||||
|
|||||||
@ -12,7 +12,9 @@ use CodeIgniter\Filters\InvalidChars;
|
|||||||
use CodeIgniter\Filters\PageCache;
|
use CodeIgniter\Filters\PageCache;
|
||||||
use CodeIgniter\Filters\PerformanceMetrics;
|
use CodeIgniter\Filters\PerformanceMetrics;
|
||||||
use CodeIgniter\Filters\SecureHeaders;
|
use CodeIgniter\Filters\SecureHeaders;
|
||||||
|
//choi.jh
|
||||||
use App\Filters\AuthFilter;
|
use App\Filters\AuthFilter;
|
||||||
|
//choi.jh
|
||||||
class Filters extends BaseFilters
|
class Filters extends BaseFilters
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -34,7 +36,7 @@ class Filters extends BaseFilters
|
|||||||
'forcehttps' => ForceHTTPS::class,
|
'forcehttps' => ForceHTTPS::class,
|
||||||
'pagecache' => PageCache::class,
|
'pagecache' => PageCache::class,
|
||||||
'performance' => PerformanceMetrics::class,
|
'performance' => PerformanceMetrics::class,
|
||||||
'authFilter' => AuthFilter::class,
|
'authFilter' => AuthFilter::class,//choi.jh
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -61,4 +61,13 @@ class Format extends BaseConfig
|
|||||||
'application/xml' => 0,
|
'application/xml' => 0,
|
||||||
'text/xml' => 0,
|
'text/xml' => 0,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Maximum depth for JSON encoding.
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This value determines how deep the JSON encoder will traverse nested structures.
|
||||||
|
*/
|
||||||
|
public int $jsonEncodeDepth = 512;
|
||||||
}
|
}
|
||||||
|
|||||||
40
app/Config/Hostnames.php
Normal file
40
app/Config/Hostnames.php
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
class Hostnames
|
||||||
|
{
|
||||||
|
// List of known two-part TLDs for subdomain extraction
|
||||||
|
public const TWO_PART_TLDS = [
|
||||||
|
'co.uk', 'org.uk', 'gov.uk', 'ac.uk', 'sch.uk', 'ltd.uk', 'plc.uk',
|
||||||
|
'com.au', 'net.au', 'org.au', 'edu.au', 'gov.au', 'asn.au', 'id.au',
|
||||||
|
'co.jp', 'ac.jp', 'go.jp', 'or.jp', 'ne.jp', 'gr.jp',
|
||||||
|
'co.nz', 'org.nz', 'govt.nz', 'ac.nz', 'net.nz', 'geek.nz', 'maori.nz', 'school.nz',
|
||||||
|
'co.in', 'net.in', 'org.in', 'ind.in', 'ac.in', 'gov.in', 'res.in',
|
||||||
|
'com.cn', 'net.cn', 'org.cn', 'gov.cn', 'edu.cn',
|
||||||
|
'com.sg', 'net.sg', 'org.sg', 'gov.sg', 'edu.sg', 'per.sg',
|
||||||
|
'co.za', 'org.za', 'gov.za', 'ac.za', 'net.za',
|
||||||
|
'co.kr', 'or.kr', 'go.kr', 'ac.kr', 'ne.kr', 'pe.kr',
|
||||||
|
'co.th', 'or.th', 'go.th', 'ac.th', 'net.th', 'in.th',
|
||||||
|
'com.my', 'net.my', 'org.my', 'edu.my', 'gov.my', 'mil.my', 'name.my',
|
||||||
|
'com.mx', 'org.mx', 'net.mx', 'edu.mx', 'gob.mx',
|
||||||
|
'com.br', 'net.br', 'org.br', 'gov.br', 'edu.br', 'art.br', 'eng.br',
|
||||||
|
'co.il', 'org.il', 'ac.il', 'gov.il', 'net.il', 'muni.il',
|
||||||
|
'co.id', 'or.id', 'ac.id', 'go.id', 'net.id', 'web.id', 'my.id',
|
||||||
|
'com.hk', 'edu.hk', 'gov.hk', 'idv.hk', 'net.hk', 'org.hk',
|
||||||
|
'com.tw', 'net.tw', 'org.tw', 'edu.tw', 'gov.tw', 'idv.tw',
|
||||||
|
'com.sa', 'net.sa', 'org.sa', 'gov.sa', 'edu.sa', 'sch.sa', 'med.sa',
|
||||||
|
'co.ae', 'net.ae', 'org.ae', 'gov.ae', 'ac.ae', 'sch.ae',
|
||||||
|
'com.tr', 'net.tr', 'org.tr', 'gov.tr', 'edu.tr', 'av.tr', 'gen.tr',
|
||||||
|
'co.ke', 'or.ke', 'go.ke', 'ac.ke', 'sc.ke', 'me.ke', 'mobi.ke', 'info.ke',
|
||||||
|
'com.ng', 'org.ng', 'gov.ng', 'edu.ng', 'net.ng', 'sch.ng', 'name.ng',
|
||||||
|
'com.pk', 'net.pk', 'org.pk', 'gov.pk', 'edu.pk', 'fam.pk',
|
||||||
|
'com.eg', 'edu.eg', 'gov.eg', 'org.eg', 'net.eg',
|
||||||
|
'com.cy', 'net.cy', 'org.cy', 'gov.cy', 'ac.cy',
|
||||||
|
'com.lk', 'org.lk', 'edu.lk', 'gov.lk', 'net.lk', 'int.lk',
|
||||||
|
'com.bd', 'net.bd', 'org.bd', 'ac.bd', 'gov.bd', 'mil.bd',
|
||||||
|
'com.ar', 'net.ar', 'org.ar', 'gov.ar', 'edu.ar', 'mil.ar',
|
||||||
|
'gob.cl', 'com.pl', 'net.pl', 'org.pl', 'gov.pl', 'edu.pl',
|
||||||
|
'co.ir', 'ac.ir', 'org.ir', 'id.ir', 'gov.ir', 'sch.ir', 'net.ir',
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -16,6 +16,8 @@ class Images extends BaseConfig
|
|||||||
/**
|
/**
|
||||||
* The path to the image library.
|
* The path to the image library.
|
||||||
* Required for ImageMagick, GraphicsMagick, or NetPBM.
|
* Required for ImageMagick, GraphicsMagick, or NetPBM.
|
||||||
|
*
|
||||||
|
* @deprecated 4.7.0 No longer used.
|
||||||
*/
|
*/
|
||||||
public string $libraryPath = '/usr/local/bin/convert';
|
public string $libraryPath = '/usr/local/bin/convert';
|
||||||
|
|
||||||
|
|||||||
@ -47,4 +47,19 @@ class Migrations extends BaseConfig
|
|||||||
* - Y_m_d_His_
|
* - Y_m_d_His_
|
||||||
*/
|
*/
|
||||||
public string $timestampFormat = 'Y-m-d-His_';
|
public string $timestampFormat = 'Y-m-d-His_';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Enable/Disable Migration Lock
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Locking is disabled by default.
|
||||||
|
*
|
||||||
|
* When enabled, it will prevent multiple migration processes
|
||||||
|
* from running at the same time by using a lock mechanism.
|
||||||
|
*
|
||||||
|
* This is useful in production environments to avoid conflicts
|
||||||
|
* or race conditions during concurrent deployments.
|
||||||
|
*/
|
||||||
|
public bool $lock = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ namespace Config;
|
|||||||
*
|
*
|
||||||
* NOTE: This class does not extend BaseConfig for performance reasons.
|
* NOTE: This class does not extend BaseConfig for performance reasons.
|
||||||
* So you cannot replace the property values with Environment Variables.
|
* So you cannot replace the property values with Environment Variables.
|
||||||
|
*
|
||||||
|
* WARNING: Do not use these options when running the app in the Worker Mode.
|
||||||
*/
|
*/
|
||||||
class Optimize
|
class Optimize
|
||||||
{
|
{
|
||||||
|
|||||||
@ -24,8 +24,8 @@ class Pager extends BaseConfig
|
|||||||
'default_full' => 'CodeIgniter\Pager\Views\default_full',
|
'default_full' => 'CodeIgniter\Pager\Views\default_full',
|
||||||
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
|
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
|
||||||
'default_head' => 'CodeIgniter\Pager\Views\default_head',
|
'default_head' => 'CodeIgniter\Pager\Views\default_head',
|
||||||
'bootstrap_full' => 'Pagers/bootstrap_full',
|
'bootstrap_full' => 'Pagers/bootstrap_full', //choi.jh
|
||||||
'bootstrap_simple' => 'Pagers/bootstrap_simple',
|
'bootstrap_simple' => 'Pagers/bootstrap_simple',//choi.jh
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -8,6 +8,7 @@ use CodeIgniter\Router\RouteCollection;
|
|||||||
// $routes->get('/', 'Home::index');
|
// $routes->get('/', 'Home::index');
|
||||||
|
|
||||||
|
|
||||||
|
//choi.jh
|
||||||
//추가 Custom RULE 만들때 : ex)UUID형식
|
//추가 Custom RULE 만들때 : ex)UUID형식
|
||||||
$routes->addPlaceholder('uuid', '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}');
|
$routes->addPlaceholder('uuid', '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}');
|
||||||
//authFilter는 추가적인 작업이 필요
|
//authFilter는 추가적인 작업이 필요
|
||||||
@ -59,3 +60,4 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
|||||||
$routes->get('latest/(:alpha)', 'BoardController::latest/$1');
|
$routes->get('latest/(:alpha)', 'BoardController::latest/$1');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
//choi.jh
|
||||||
@ -96,6 +96,15 @@ class Routing extends BaseRouting
|
|||||||
*/
|
*/
|
||||||
public bool $autoRoute = false;
|
public bool $autoRoute = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If TRUE, the system will look for attributes on controller
|
||||||
|
* class and methods that can run before and after the
|
||||||
|
* controller/method.
|
||||||
|
*
|
||||||
|
* If FALSE, will ignore any attributes.
|
||||||
|
*/
|
||||||
|
public bool $useControllerAttributes = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For Defined Routes.
|
* For Defined Routes.
|
||||||
* If TRUE, will enable the use of the 'prioritize' option
|
* If TRUE, will enable the use of the 'prioritize' option
|
||||||
|
|||||||
@ -4,10 +4,13 @@ namespace Config;
|
|||||||
|
|
||||||
use CodeIgniter\Config\BaseService;
|
use CodeIgniter\Config\BaseService;
|
||||||
|
|
||||||
|
//choi.jh
|
||||||
use App\Services\Auth\GoogleService;
|
use App\Services\Auth\GoogleService;
|
||||||
use App\Services\Auth\LocalService;
|
use App\Services\Auth\LocalService;
|
||||||
use App\Services\BoardService;
|
use App\Services\BoardService;
|
||||||
use App\Services\UserService;
|
use App\Services\UserService;
|
||||||
|
//choi.jh
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Services Configuration file.
|
* Services Configuration file.
|
||||||
*
|
*
|
||||||
@ -33,7 +36,7 @@ class Services extends BaseService
|
|||||||
* return new \CodeIgniter\Example();
|
* return new \CodeIgniter\Example();
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
|
//choi.jh
|
||||||
public static function myauth($getShared = true): LocalService
|
public static function myauth($getShared = true): LocalService
|
||||||
{
|
{
|
||||||
if ($getShared) {
|
if ($getShared) {
|
||||||
@ -85,4 +88,5 @@ class Services extends BaseService
|
|||||||
new \App\Models\BoardModel(),
|
new \App\Models\BoardModel(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
//choi.jh
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,7 @@ class Session extends BaseConfig
|
|||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* The session storage driver to use:
|
* The session storage driver to use:
|
||||||
|
* - `CodeIgniter\Session\Handlers\ArrayHandler` (for testing)
|
||||||
* - `CodeIgniter\Session\Handlers\FileHandler`
|
* - `CodeIgniter\Session\Handlers\FileHandler`
|
||||||
* - `CodeIgniter\Session\Handlers\DatabaseHandler`
|
* - `CodeIgniter\Session\Handlers\DatabaseHandler`
|
||||||
* - `CodeIgniter\Session\Handlers\MemcachedHandler`
|
* - `CodeIgniter\Session\Handlers\MemcachedHandler`
|
||||||
|
|||||||
@ -119,4 +119,29 @@ class Toolbar extends BaseConfig
|
|||||||
public array $watchedExtensions = [
|
public array $watchedExtensions = [
|
||||||
'php', 'css', 'js', 'html', 'svg', 'json', 'env',
|
'php', 'css', 'js', 'html', 'svg', 'json', 'env',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Ignored HTTP Headers
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* CodeIgniter Debug Toolbar normally injects HTML and JavaScript into every
|
||||||
|
* HTML response. This is correct for full page loads, but it breaks requests
|
||||||
|
* that expect only a clean HTML fragment.
|
||||||
|
*
|
||||||
|
* Libraries like HTMX, Unpoly, and Hotwire (Turbo) update parts of the page or
|
||||||
|
* manage navigation on the client side. Injecting the Debug Toolbar into their
|
||||||
|
* responses can cause invalid HTML, duplicated scripts, or JavaScript errors
|
||||||
|
* (such as infinite loops or "Maximum call stack size exceeded").
|
||||||
|
*
|
||||||
|
* Any request containing one of the following headers is treated as a
|
||||||
|
* client-managed or partial request, and the Debug Toolbar injection is skipped.
|
||||||
|
*
|
||||||
|
* @var array<string, string|null>
|
||||||
|
*/
|
||||||
|
public array $disableOnHeaders = [
|
||||||
|
'X-Requested-With' => 'xmlhttprequest', // AJAX requests
|
||||||
|
'HX-Request' => 'true', // HTMX requests
|
||||||
|
'X-Up-Version' => null, // Unpoly partial requests
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -230,9 +230,13 @@ class UserAgents extends BaseConfig
|
|||||||
*/
|
*/
|
||||||
public array $robots = [
|
public array $robots = [
|
||||||
'googlebot' => 'Googlebot',
|
'googlebot' => 'Googlebot',
|
||||||
|
'google-pagerenderer' => 'Google Page Renderer',
|
||||||
|
'google-read-aloud' => 'Google Read Aloud',
|
||||||
|
'google-safety' => 'Google Safety Bot',
|
||||||
'msnbot' => 'MSNBot',
|
'msnbot' => 'MSNBot',
|
||||||
'baiduspider' => 'Baiduspider',
|
'baiduspider' => 'Baiduspider',
|
||||||
'bingbot' => 'Bing',
|
'bingbot' => 'Bing',
|
||||||
|
'bingpreview' => 'BingPreview',
|
||||||
'slurp' => 'Inktomi Slurp',
|
'slurp' => 'Inktomi Slurp',
|
||||||
'yahoo' => 'Yahoo',
|
'yahoo' => 'Yahoo',
|
||||||
'ask jeeves' => 'Ask Jeeves',
|
'ask jeeves' => 'Ask Jeeves',
|
||||||
@ -248,5 +252,11 @@ class UserAgents extends BaseConfig
|
|||||||
'ia_archiver' => 'Alexa Crawler',
|
'ia_archiver' => 'Alexa Crawler',
|
||||||
'MJ12bot' => 'Majestic-12',
|
'MJ12bot' => 'Majestic-12',
|
||||||
'Uptimebot' => 'Uptimebot',
|
'Uptimebot' => 'Uptimebot',
|
||||||
|
'duckduckbot' => 'DuckDuckBot',
|
||||||
|
'sogou' => 'Sogou Spider',
|
||||||
|
'exabot' => 'Exabot',
|
||||||
|
'bot' => 'Generic Bot',
|
||||||
|
'crawler' => 'Generic Crawler',
|
||||||
|
'spider' => 'Generic Spider',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,6 @@ class Validation extends BaseConfig
|
|||||||
FormatRules::class,
|
FormatRules::class,
|
||||||
FileRules::class,
|
FileRules::class,
|
||||||
CreditCardRules::class,
|
CreditCardRules::class,
|
||||||
\App\Validation\CustomRules::class,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,7 +36,6 @@ class Validation extends BaseConfig
|
|||||||
public array $templates = [
|
public array $templates = [
|
||||||
'list' => 'CodeIgniter\Validation\Views\list',
|
'list' => 'CodeIgniter\Validation\Views\list',
|
||||||
'single' => 'CodeIgniter\Validation\Views\single',
|
'single' => 'CodeIgniter\Validation\Views\single',
|
||||||
\App\Validation\CustomRules::class, // ✅ 추가
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|||||||
50
app/Config/WorkerMode.php
Normal file
50
app/Config/WorkerMode.php
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This configuration controls how CodeIgniter behaves when running
|
||||||
|
* in worker mode (with FrankenPHP).
|
||||||
|
*/
|
||||||
|
class WorkerMode
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Persistent Services
|
||||||
|
*
|
||||||
|
* List of service names that should persist across requests.
|
||||||
|
* These services will NOT be reset between requests.
|
||||||
|
*
|
||||||
|
* Services not in this list will be reset for each request to prevent
|
||||||
|
* state leakage.
|
||||||
|
*
|
||||||
|
* Recommended persistent services:
|
||||||
|
* - `autoloader`: PSR-4 autoloading configuration
|
||||||
|
* - `locator`: File locator
|
||||||
|
* - `exceptions`: Exception handler
|
||||||
|
* - `commands`: CLI commands registry
|
||||||
|
* - `codeigniter`: Main application instance
|
||||||
|
* - `superglobals`: Superglobals wrapper
|
||||||
|
* - `routes`: Router configuration
|
||||||
|
* - `cache`: Cache instance
|
||||||
|
*
|
||||||
|
* @var list<string>
|
||||||
|
*/
|
||||||
|
public array $persistentServices = [
|
||||||
|
'autoloader',
|
||||||
|
'locator',
|
||||||
|
'exceptions',
|
||||||
|
'commands',
|
||||||
|
'codeigniter',
|
||||||
|
'superglobals',
|
||||||
|
'routes',
|
||||||
|
'cache',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Force Garbage Collection
|
||||||
|
*
|
||||||
|
* Whether to force garbage collection after each request.
|
||||||
|
* Helps prevent memory leaks at a small performance cost.
|
||||||
|
*/
|
||||||
|
public bool $forceGarbageCollection = true;
|
||||||
|
}
|
||||||
@ -7,7 +7,7 @@ use CodeIgniter\HTTP\RequestInterface;
|
|||||||
use CodeIgniter\HTTP\ResponseInterface;
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
class Welcome extends AdminController
|
class Home extends AdminController
|
||||||
{
|
{
|
||||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
{
|
{
|
||||||
|
|||||||
45
app/Controllers/BaseController copy.php
Normal file
45
app/Controllers/BaseController copy.php
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use CodeIgniter\Controller;
|
||||||
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BaseController provides a convenient place for loading components
|
||||||
|
* and performing functions that are needed by all your controllers.
|
||||||
|
*
|
||||||
|
* Extend this class in any new controllers:
|
||||||
|
* ```
|
||||||
|
* class Home extends BaseController
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* For security, be sure to declare any new methods as protected or private.
|
||||||
|
*/
|
||||||
|
abstract class BaseController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Be sure to declare properties for any property fetch you initialized.
|
||||||
|
* The creation of dynamic property is deprecated in PHP 8.2.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// protected $session;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
|
{
|
||||||
|
// Load here all helpers you want to be available in your controllers that extend BaseController.
|
||||||
|
// Caution: Do not put the this below the parent::initController() call below.
|
||||||
|
// $this->helpers = ['form', 'url'];
|
||||||
|
|
||||||
|
// Caution: Do not edit this line.
|
||||||
|
parent::initController($request, $response, $logger);
|
||||||
|
|
||||||
|
// Preload any models, libraries, etc, here.
|
||||||
|
// $this->session = service('session');
|
||||||
|
}
|
||||||
|
}
|
||||||
331
app/Views/welcome_message.php
Normal file
331
app/Views/welcome_message.php
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user