]> git.mxchange.org Git - hub.git/commitdiff
Better proxy support, detection of external IP moved to application helper class...
authorRoland Häder <roland@mxchange.org>
Mon, 2 Jul 2012 19:14:49 +0000 (19:14 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 2 Jul 2012 19:14:49 +0000 (19:14 +0000)
application/hub/class_ApplicationHelper.php
application/hub/config-local.php-dist
application/hub/config.php

index 197a02d283b5791a9c1b2d566df6d9f94858ac86..db3b2992185d0e6c940ed2bd8f54d846c3e9625e 100644 (file)
@@ -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();
index ae800e2373ff7f6dff1a96da424f61a1c615395d..7d63bc911861ab5a104cd2e02f73d4bb5821bc2b 100644 (file)
@@ -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');
index 529c34ca2a1d913563a37604b9105c4db5930868..684948952730e0c07bdbf0bb2b1d635b5b8c9625 100644 (file)
@@ -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());