From ce6f43b7120a184aa0cff0bdb90fa3d7f032e14b Mon Sep 17 00:00:00 2001 From: Chris Passas Date: Tue, 12 Feb 2013 16:58:38 -0500 Subject: Update system/core/Common.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If using nginx instead of apache by default nginx will not populate the $_SERVER['HTTPS'] value.  This change allows falling back to checking the port number of the request to determine if your on SSL or not. The other option is adding the following to your nginx config. fastcgi_param HTTPS on; #some php apps require this to detent https --- system/core/Common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/core') diff --git a/system/core/Common.php b/system/core/Common.php index 258cd4967..b9c872748 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -343,7 +343,7 @@ if ( ! function_exists('is_https')) */ function is_https() { - return ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off'); + return ( ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ) || ($_SERVER["SERVER_PORT"] === '443') ); } } @@ -713,4 +713,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 */ -- cgit v1.2.3-24-g4f1b