diff options
Diffstat (limited to 'system/core')
-rw-r--r-- | system/core/Common.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/system/core/Common.php b/system/core/Common.php index cad340f33..7bf11dae5 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -345,9 +345,17 @@ if ( ! function_exists('is_https')) * @return bool */ function is_https() - { - return (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) === 'on'); - } + { + if(isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) === 'on'){ + return True; + }elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https'){ + return True; + }elseif (isset($_SERVER['HTTP_FRONT_END_HTTPS']) && $_SERVER['HTTP_FRONT_END_HTTPS'] == 'on'){ + return True; + }else{ + return False + } + } } // ------------------------------------------------------------------------ @@ -731,4 +739,4 @@ if ( ! function_exists('function_usable')) } /* End of file Common.php */ -/* Location: ./system/core/Common.php */
\ No newline at end of file +/* Location: ./system/core/Common.php */ |