diff options
-rw-r--r-- | inc/poche/Tools.class.php | 8 | ||||
-rwxr-xr-x | inc/poche/config.inc.php.new | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 8eb988f4..1d092823 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php | |||
@@ -41,10 +41,14 @@ class Tools | |||
41 | $https = (!empty($_SERVER['HTTPS']) | 41 | $https = (!empty($_SERVER['HTTPS']) |
42 | && (strtolower($_SERVER['HTTPS']) == 'on')) | 42 | && (strtolower($_SERVER['HTTPS']) == 'on')) |
43 | || (isset($_SERVER["SERVER_PORT"]) | 43 | || (isset($_SERVER["SERVER_PORT"]) |
44 | && $_SERVER["SERVER_PORT"] == '443'); // HTTPS detection. | 44 | && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection. |
45 | || (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port detection | ||
46 | && $_SERVER["SERVER_PORT"] == SSL_PORT); | ||
47 | |||
45 | $serverport = (!isset($_SERVER["SERVER_PORT"]) | 48 | $serverport = (!isset($_SERVER["SERVER_PORT"]) |
46 | || $_SERVER["SERVER_PORT"] == '80' | 49 | || $_SERVER["SERVER_PORT"] == '80' |
47 | || ($https && $_SERVER["SERVER_PORT"] == '443') | 50 | || ($https && $_SERVER["SERVER_PORT"] == '443') |
51 | || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection | ||
48 | ? '' : ':' . $_SERVER["SERVER_PORT"]); | 52 | ? '' : ':' . $_SERVER["SERVER_PORT"]); |
49 | 53 | ||
50 | $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); | 54 | $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); |
@@ -243,4 +247,4 @@ class Tools | |||
243 | $lang = explode('.', $userlanguage); | 247 | $lang = explode('.', $userlanguage); |
244 | return str_replace('_', '-', $lang[0]); | 248 | return str_replace('_', '-', $lang[0]); |
245 | } | 249 | } |
246 | } \ No newline at end of file | 250 | } |
diff --git a/inc/poche/config.inc.php.new b/inc/poche/config.inc.php.new index 99223c78..c60d4f80 100755 --- a/inc/poche/config.inc.php.new +++ b/inc/poche/config.inc.php.new | |||
@@ -25,6 +25,9 @@ define ('STORAGE_PASSWORD', 'poche'); | |||
25 | # Do not trespass unless you know what you are doing | 25 | # Do not trespass unless you know what you are doing |
26 | ################################################################################# | 26 | ################################################################################# |
27 | 27 | ||
28 | // Change this if not using the standart port for SSL - i.e you server is behind sslh | ||
29 | define ('SSL_PORT', 443); | ||
30 | |||
28 | define ('MODE_DEMO', FALSE); | 31 | define ('MODE_DEMO', FALSE); |
29 | define ('DEBUG_POCHE', FALSE); | 32 | define ('DEBUG_POCHE', FALSE); |
30 | define ('DOWNLOAD_PICTURES', FALSE); | 33 | define ('DOWNLOAD_PICTURES', FALSE); |
@@ -55,4 +58,4 @@ define ('INSTAPAPER_FILE', '/instapaper-export.html'); | |||
55 | 58 | ||
56 | define ('IMPORT_POCKET_FILE', ROOT . POCKET_FILE); | 59 | define ('IMPORT_POCKET_FILE', ROOT . POCKET_FILE); |
57 | define ('IMPORT_READABILITY_FILE', ROOT . READABILITY_FILE); | 60 | define ('IMPORT_READABILITY_FILE', ROOT . READABILITY_FILE); |
58 | define ('IMPORT_INSTAPAPER_FILE', ROOT . INSTAPAPER_FILE); \ No newline at end of file | 61 | define ('IMPORT_INSTAPAPER_FILE', ROOT . INSTAPAPER_FILE); |