PMC-541-B

This commit is contained in:
Roly Rudy Gutierrez Pinto
2019-03-25 08:09:11 -04:00
parent a68b707ecd
commit f84e73580c
3 changed files with 8 additions and 3 deletions

View File

@@ -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');
}

View File

@@ -223,7 +223,6 @@ class AppDelegation extends BaseAppDelegation
try {
$res = $this->save();
} catch (PropelException $e) {
error_log($e->getMessage());
return;
}
} else {

View File

@@ -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();