diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 8eb988f..1d09282 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -41,10 +41,14 @@ class Tools $https = (!empty($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on')) || (isset($_SERVER["SERVER_PORT"]) - && $_SERVER["SERVER_PORT"] == '443'); // HTTPS detection. + && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection. + || (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port detection + && $_SERVER["SERVER_PORT"] == SSL_PORT); + $serverport = (!isset($_SERVER["SERVER_PORT"]) || $_SERVER["SERVER_PORT"] == '80' || ($https && $_SERVER["SERVER_PORT"] == '443') + || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection ? '' : ':' . $_SERVER["SERVER_PORT"]); $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); @@ -243,4 +247,4 @@ class Tools $lang = explode('.', $userlanguage); return str_replace('_', '-', $lang[0]); } -} \ No newline at end of file +} diff --git a/inc/poche/config.inc.php.new b/inc/poche/config.inc.php.new index 99223c7..c60d4f8 100755 --- a/inc/poche/config.inc.php.new +++ b/inc/poche/config.inc.php.new @@ -25,6 +25,9 @@ define ('STORAGE_PASSWORD', 'poche'); # 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 ('DEBUG_POCHE', FALSE); define ('DOWNLOAD_PICTURES', FALSE); @@ -55,4 +58,4 @@ define ('INSTAPAPER_FILE', '/instapaper-export.html'); define ('IMPORT_POCKET_FILE', ROOT . POCKET_FILE); define ('IMPORT_READABILITY_FILE', ROOT . READABILITY_FILE); -define ('IMPORT_INSTAPAPER_FILE', ROOT . INSTAPAPER_FILE); \ No newline at end of file +define ('IMPORT_INSTAPAPER_FILE', ROOT . INSTAPAPER_FILE);