summaryrefslogtreecommitdiff
path: root/include/functions.php
diff options
context:
space:
mode:
authorNatan Frei <[email protected]>2017-07-17 00:44:48 +0300
committerNatan Frei <[email protected]>2017-07-17 00:44:48 +0300
commite234ac8dcb2fa73bc573fea1e809ef45b3392ca7 (patch)
treefc536b1228b5c671fb0eb420fb2e2b4431b29b1a /include/functions.php
parent9fa3ae09a6fe791805ee63e87fcac970e3f037ed (diff)
$_SERVER['HTTPS'] can be exists and 'off' for non-https connectios
Diffstat (limited to 'include/functions.php')
-rw-r--r--include/functions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index ad6f2689c..ba5a699b9 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1782,7 +1782,7 @@
}
function is_server_https() {
- return $_SERVER['HTTPS'] == 'on' || $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https';
+ return (!empty($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] != 'off')) || $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https';
}
function is_prefix_https() {