684,16 → 684,8 |
|
$is_ssl = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === 'on'); |
$protocol = $is_ssl ? 'https' : 'http'; |
$host = $_SERVER['HTTP_HOST']; |
$port = $_SERVER['SERVER_PORT']; |
if ($is_ssl && ($port != 443)) { |
$port_add = ":$port"; |
} else if (!$is_ssl && ($port != 80)) { |
$port_add = ":$port"; |
} else { |
$port_add = ""; |
} |
$res = $protocol.'://'.$host.$port_add.$res; |
$host = $_SERVER['HTTP_HOST']; // includes port if it is not 80/443 |
$res = $protocol.'://'.$host.$res; |
|
try { |
OIDplus::config()->setValue('last_known_system_url', $res); |