]> git.wh0rd.org - tt-rss.git/blobdiff - include/sessions.php
$_SERVER['HTTPS'] can be exists and 'off' for non-https connectios
[tt-rss.git] / include / sessions.php
index 0690ab7ed0a84b5924dcbf332ddf1f0c5b365b95..3d6e6e2c627a8c1339435d259d7a54af6bd800a5 100644 (file)
@@ -12,7 +12,7 @@
        $session_expire = min(2147483647 - time() - 1, max(SESSION_COOKIE_LIFETIME, 86400));
        $session_name = (!defined('TTRSS_SESSION_NAME')) ? "ttrss_sid" : TTRSS_SESSION_NAME;
 
-       if (@$_SERVER['HTTPS'] == "on") {
+       if ((!empty($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] != 'off')) || @$_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
                $session_name .= "_ssl";
                ini_set("session.cookie_secure", true);
        }