From db72eb7c444ddf0a503dd12248f8a5da9dcecdb5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 2 Jul 2012 19:14:49 +0000 Subject: [PATCH] Better proxy support, detection of external IP moved to application helper class, fixed instancing configuration class --- application/hub/class_ApplicationHelper.php | 3 +++ application/hub/config-local.php-dist | 2 +- application/hub/config.php | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/hub/class_ApplicationHelper.php b/application/hub/class_ApplicationHelper.php index 197a02d28..db3b29921 100644 --- a/application/hub/class_ApplicationHelper.php +++ b/application/hub/class_ApplicationHelper.php @@ -152,6 +152,9 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica // Set this application in registry Registry::getRegistry()->addInstance('app', $this); + // Determine external IP + $this->getConfigInstance()->setConfigEntry('external_ip', ConsoleTools::determineExternalIp()); + // Default response is console $response = $this->getResponseTypeFromSystem(); $responseType = $this->getResponseTypeFromSystem(); diff --git a/application/hub/config-local.php-dist b/application/hub/config-local.php-dist index ae800e237..7d63bc911 100644 --- a/application/hub/config-local.php-dist +++ b/application/hub/config-local.php-dist @@ -34,7 +34,7 @@ */ // Some hub-specific configuration like port hostname where we will listen, etc. -$cfg = FrameworkConfiguration::getInstance(); +$cfg = FrameworkConfiguration::getSelfInstance(); // CFG: NODE-LISTEN-ADDR $cfg->setConfigEntry('node_listen_addr', '0.0.0.0'); diff --git a/application/hub/config.php b/application/hub/config.php index 529c34ca2..684948952 100644 --- a/application/hub/config.php +++ b/application/hub/config.php @@ -601,9 +601,6 @@ $cfg->setConfigEntry('node_id', ''); // CFG: SESSION-ID $cfg->setConfigEntry('session_id', ''); -// CFG: EXTERNAL-IP -$cfg->setConfigEntry('external_ip', ConsoleTools::determineExternalIp()); - // CFG: INTERNAL-IP $cfg->setConfigEntry('internal_ip', ConsoleTools::acquireSelfIPAddress()); -- 2.39.5