From d20063ae810c0ae9716814d7821c4a7b39179206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=A4=E6=9C=A8=E5=A4=A9=E7=90=AA?= Date: Thu, 24 May 2018 18:09:21 +0800 Subject: [PATCH 1/2] Update config.environment.inc.php add auth config to environment --- includes/config.environment.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/config.environment.inc.php b/includes/config.environment.inc.php index 7f32a20..cde45e0 100644 --- a/includes/config.environment.inc.php +++ b/includes/config.environment.inc.php @@ -23,7 +23,8 @@ $server_name = getenv($prefix . 'NAME'); $server_host = getenv($prefix . 'HOST'); $server_port = getenv($prefix . 'PORT'); - + $server_auth = getenv($prefix . 'AUTH'); + if (empty($server_host)) { break; } @@ -40,6 +41,7 @@ 'name' => $server_name, 'host' => $server_host, 'port' => $server_port, + 'auth' => $server_auth, 'filter' => '*', ); From f8b3cd710b4370ac485fa2283963875a8d402786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=A4=E6=9C=A8=E5=A4=A9=E7=90=AA?= Date: Thu, 24 May 2018 18:21:24 +0800 Subject: [PATCH 2/2] Update config.environment.inc.php fix auth config env --- includes/config.environment.inc.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/includes/config.environment.inc.php b/includes/config.environment.inc.php index cde45e0..d8c9ae8 100644 --- a/includes/config.environment.inc.php +++ b/includes/config.environment.inc.php @@ -24,7 +24,7 @@ $server_host = getenv($prefix . 'HOST'); $server_port = getenv($prefix . 'PORT'); $server_auth = getenv($prefix . 'AUTH'); - + if (empty($server_host)) { break; } @@ -32,6 +32,10 @@ if (empty($server_name)) { $server_name = $server_host; } + + if (empty($server_auth)) { + $server_auth = ""; + } if (empty($server_port)) { $server_port = 6379; @@ -41,9 +45,12 @@ 'name' => $server_name, 'host' => $server_host, 'port' => $server_port, - 'auth' => $server_auth, 'filter' => '*', ); + + if (!empty($server_auth)) { + $config['servers'][$i-1]['auth'] = $server_auth; + } $i++; }