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