From d31613c9ec2fa45c662f1b70fc31ad30d5b56550 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sun, 19 Jun 2011 01:47:06 +0100 Subject: [PATCH] Additional tests for HTTPS in redirects --- source/lib/SihnonFramework/Main.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/SihnonFramework/Main.class.php b/source/lib/SihnonFramework/Main.class.php index c473aa5..fc1df5c 100644 --- a/source/lib/SihnonFramework/Main.class.php +++ b/source/lib/SihnonFramework/Main.class.php @@ -91,7 +91,7 @@ class SihnonFramework_Main { } public function absoluteUrl($relative_url) { - $secure = isset($_SERVER['SECURE']); + $secure = isset($_SERVER['SECURE']) || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'); $port = $_SERVER['SERVER_PORT']; return 'http' . ($secure ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . (($port == 80 || ($secure && $port == 443)) ? '' : ':' . $port)