Update: 2026-08-01 18:52:11
This commit is contained in:
@@ -90,19 +90,24 @@ function getJwtSecret(): string {
|
||||
// Redis password: try env var, then Docker keys, then legacy path, then null (Docker Redis has no password)
|
||||
$redisPass = null;
|
||||
$redisPassPaths = [
|
||||
getenv('REDIS_PASS_KEY_PATH') ?: '',
|
||||
__DIR__ . '/../loction-keys/.reds_pass_key',
|
||||
'/keys/.reds_pass_key',
|
||||
'/home/location/.reds_pass_key',
|
||||
'/home/location/.reds_pass_key'
|
||||
];
|
||||
foreach ($redisPassPaths as $rpp) {
|
||||
if (!empty($rpp) && file_exists($rpp)) {
|
||||
if (file_exists($rpp)) {
|
||||
$redisPass = trim((string) @file_get_contents($rpp));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($redisPass)) {
|
||||
$redisPass = getenv('REDIS_MAIN_PASSWORD') ?: ($_ENV['REDIS_MAIN_PASSWORD'] ?? (getenv('REDIS_PASSWORD') ?: ($_ENV['REDIS_PASSWORD'] ?? null)));
|
||||
}
|
||||
|
||||
if (empty($INTERNAL_KEY)) logMsg('⚠️ Internal key not found (non-critical in Docker)');
|
||||
if (empty($redisPass)) logMsg('ℹ️ Redis password not set (OK for Docker — no auth required)');
|
||||
else logMsg('✅ Redis password loaded successfully');
|
||||
|
||||
// ============================================================
|
||||
// 🗄️ Redis Singleton
|
||||
|
||||
Reference in New Issue
Block a user