mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 16:15:20 +02:00
* refactor * fix: case-sensitive config from env, fix #2935 * lowercase all config section and keys * test: add test for case-insensitivity
This commit is contained in:
parent
edbafc6144
commit
5165ea265d
10 changed files with 78 additions and 161 deletions
|
@ -33,12 +33,15 @@ final class RssBridge
|
|||
private function run($request): void
|
||||
{
|
||||
Configuration::verifyInstallation();
|
||||
Configuration::loadConfiguration();
|
||||
|
||||
$customConfig = [];
|
||||
if (file_exists(__DIR__ . '/../config.ini.php')) {
|
||||
$customConfig = parse_ini_file(__DIR__ . '/../config.ini.php', true, INI_SCANNER_TYPED);
|
||||
}
|
||||
Configuration::loadConfiguration($customConfig, getenv());
|
||||
|
||||
date_default_timezone_set(Configuration::getConfig('system', 'timezone'));
|
||||
|
||||
define('CUSTOM_CACHE_TIMEOUT', Configuration::getConfig('cache', 'custom_timeout'));
|
||||
|
||||
$authenticationMiddleware = new AuthenticationMiddleware();
|
||||
if (Configuration::getConfig('authentication', 'enable')) {
|
||||
$authenticationMiddleware();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue