mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-27 11:31:05 +00:00
Added support for custom ssl port
This commit is contained in:
parent
bf7516112f
commit
125f9ee838
1 changed files with 6 additions and 2 deletions
|
@ -41,10 +41,14 @@ class Tools
|
||||||
$https = (!empty($_SERVER['HTTPS'])
|
$https = (!empty($_SERVER['HTTPS'])
|
||||||
&& (strtolower($_SERVER['HTTPS']) == 'on'))
|
&& (strtolower($_SERVER['HTTPS']) == 'on'))
|
||||||
|| (isset($_SERVER["SERVER_PORT"])
|
|| (isset($_SERVER["SERVER_PORT"])
|
||||||
&& $_SERVER["SERVER_PORT"] == '443'); // HTTPS detection.
|
&& $_SERVER["SERVER_PORT"] == '443') // HTTPS detection.
|
||||||
|
|| (isset($_SERVER["SERVER_PORT"]) && isset($SSL_PORT) //Custom HTTPS port detection
|
||||||
|
&& $_SERVER["SERVER_PORT"] == $SSL_PORT);
|
||||||
|
|
||||||
$serverport = (!isset($_SERVER["SERVER_PORT"])
|
$serverport = (!isset($_SERVER["SERVER_PORT"])
|
||||||
|| $_SERVER["SERVER_PORT"] == '80'
|
|| $_SERVER["SERVER_PORT"] == '80'
|
||||||
|| ($https && $_SERVER["SERVER_PORT"] == '443')
|
|| ($https && $_SERVER["SERVER_PORT"] == '443')
|
||||||
|
|| ($https && $_SERVER["SERVER_PORT"]==$SSL_PORT) //Custom HTTPS port detection
|
||||||
? '' : ':' . $_SERVER["SERVER_PORT"]);
|
? '' : ':' . $_SERVER["SERVER_PORT"]);
|
||||||
|
|
||||||
$scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]);
|
$scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]);
|
||||||
|
@ -243,4 +247,4 @@ class Tools
|
||||||
$lang = explode('.', $userlanguage);
|
$lang = explode('.', $userlanguage);
|
||||||
return str_replace('_', '-', $lang[0]);
|
return str_replace('_', '-', $lang[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue