PMC-541-B
This commit is contained in:
@@ -160,7 +160,13 @@ try {
|
|||||||
|
|
||||||
define('SERVER_NAME', $SERVER_INFO['SERVER_NAME']);
|
define('SERVER_NAME', $SERVER_INFO['SERVER_NAME']);
|
||||||
define('SERVER_PORT', $SERVER_INFO['SERVER_PORT']);
|
define('SERVER_PORT', $SERVER_INFO['SERVER_PORT']);
|
||||||
define('REQUEST_SCHEME', $SERVER_INFO['REQUEST_SCHEME']);
|
//to do improvement G::is_https()
|
||||||
|
if ((isset($SERVER_INFO['HTTPS']) && $SERVER_INFO['HTTPS'] == 'on') ||
|
||||||
|
(isset($SERVER_INFO['HTTP_X_FORWARDED_PROTO']) && $SERVER_INFO['HTTP_X_FORWARDED_PROTO'] == 'https')) {
|
||||||
|
define('REQUEST_SCHEME', 'https');
|
||||||
|
} else {
|
||||||
|
define('REQUEST_SCHEME', $SERVER_INFO['REQUEST_SCHEME']);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
eprintln('WARNING! No server info found!', 'red');
|
eprintln('WARNING! No server info found!', 'red');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,7 +223,6 @@ class AppDelegation extends BaseAppDelegation
|
|||||||
try {
|
try {
|
||||||
$res = $this->save();
|
$res = $this->save();
|
||||||
} catch (PropelException $e) {
|
} catch (PropelException $e) {
|
||||||
error_log($e->getMessage());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1578,7 +1578,7 @@ class System
|
|||||||
public static function getServerHost()
|
public static function getServerHost()
|
||||||
{
|
{
|
||||||
$port = self::getServerPort();
|
$port = self::getServerPort();
|
||||||
if (!empty($port) && $port != '80') {
|
if (!empty($port) && $port != '80' && $port != '443') {
|
||||||
return self::getServerHostname() . ':' . $port;
|
return self::getServerHostname() . ':' . $port;
|
||||||
}
|
}
|
||||||
return self::getServerHostname();
|
return self::getServerHostname();
|
||||||
|
|||||||
Reference in New Issue
Block a user