summaryrefslogtreecommitdiff
path: root/include/sessions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-07-17 07:33:43 +0300
committerAndrew Dolgov <[email protected]>2017-07-17 07:33:43 +0300
commit1b5b1e5fec02c9158ea655dcc933380f4f464c99 (patch)
tree0d2d8e40d57bb8b6d25ab865889bda06c2565de3 /include/sessions.php
parent2cdef2488821c27acb6f67cad82999fe4fdb8a88 (diff)
sessions: use is_server_https() for secure cookie setting
Diffstat (limited to 'include/sessions.php')
-rw-r--r--include/sessions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sessions.php b/include/sessions.php
index 3d6e6e2c6..7ea9052bc 100644
--- a/include/sessions.php
+++ b/include/sessions.php
@@ -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 ((!empty($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] != 'off')) || @$_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
+ if (is_server_https()) {
$session_name .= "_ssl";
ini_set("session.cookie_secure", true);
}