1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-27 11:22:17 -05:00

Added support for custom SSL port

This commit is contained in:
Jean-Christophe Saad-Dupuy 2013-10-07 12:47:13 +02:00
parent 3352332f3f
commit 2916d24b20
2 changed files with 7 additions and 4 deletions

View File

@ -42,13 +42,13 @@ class Tools
&& (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 || (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port detection
&& $_SERVER["SERVER_PORT"] == $SSL_PORT); && $_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 || ($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"]);

View File

@ -25,6 +25,9 @@ define ('STORAGE_PASSWORD', 'poche');
# Do not trespass unless you know what you are doing # Do not trespass unless you know what you are doing
################################################################################# #################################################################################
// Change this if not using the standart port for SSL - i.e you server is behind sslh
define ('SSL_PORT', 443);
define ('MODE_DEMO', FALSE); define ('MODE_DEMO', FALSE);
define ('DEBUG_POCHE', FALSE); define ('DEBUG_POCHE', FALSE);
define ('DOWNLOAD_PICTURES', FALSE); define ('DOWNLOAD_PICTURES', FALSE);