Commit 930f0509 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '6108-the-link-in-the-public-form-is-wrong' into '1.4-dev'

Resolve "the link in the public form is wrong"

See merge request fusiondirectory/fd!791
Showing with 5 additions and 4 deletions
+5 -4
......@@ -46,15 +46,16 @@ class URL
$protocol .= 's';
}
$port = '80';
if (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
$host = $_SERVER['HTTP_X_FORWARDED_HOST'];
if (isset($_SERVER['HTTP_X_FORWARDED_PORT'])) {
$port = $_SERVER['HTTP_X_FORWARDED_PORT'];
}
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
$protocol = $_SERVER['HTTP_X_FORWARDED_PROTO'];
}
if (isset($_SERVER['HTTP_X_FORWARDED_PORT'])) {
$port = $_SERVER['HTTP_X_FORWARDED_PORT'];
} else {
$port = ($protocol === 'http' ? 80 : 443);
}
} else {
if (!empty($_SERVER['HTTP_HOST'])) {
$host = $_SERVER['HTTP_HOST'];
......
Supports Markdown
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