diff options
Diffstat (limited to 'system/core/Common.php')
-rw-r--r-- | system/core/Common.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/system/core/Common.php b/system/core/Common.php index cad340f33..93cd0a0ae 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -346,7 +346,20 @@ if ( ! function_exists('is_https')) */ function is_https() { - return (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) === 'on'); + if ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') + { + return TRUE; + } + elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') + { + return TRUE; + } + elseif ( ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') + { + return TRUE; + } + + return FALSE; } } |