Commit ad75d872 authored by Dmitrii Metelkin's avatar Dmitrii Metelkin Committed by Robert Lyon
Browse files

Bug 1717861: fix incorrect full script path when using sslproxy

behatnotneeded

Change-Id: I0ea71a5402889e41dc121e26ddde8bf020e9e76f
(cherry picked from commit 4655c27f)
parent 75b457c4
......@@ -3483,6 +3483,11 @@ function get_full_script_path() {
if (!empty($url['port'])) {
$hostname .= ':'.$url['port'];
} else if (!empty($_SERVER['SERVER_PORT'])) {
// SSL proxy could be on a random port and we don't want it to appear in URL.
if (get_config('sslproxy')) {
$_SERVER['SERVER_PORT'] = '443';
}
if ($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
$hostname .= ':'.$_SERVER['SERVER_PORT'];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment