From 10c3bded0aa1a8f901b10895b6c360369444f30e Mon Sep 17 00:00:00 2001 From: btopro Date: Sat, 5 Oct 2019 09:52:01 -0400 Subject: [PATCH] #444 fallback check --- system/lib/HAXCMS.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/lib/HAXCMS.php b/system/lib/HAXCMS.php index 9c06d63ae57..01a8d7eee34 100755 --- a/system/lib/HAXCMS.php +++ b/system/lib/HAXCMS.php @@ -95,6 +95,10 @@ public function __construct() !in_array(strtolower($_SERVER['HTTPS']), array('off', 'no')) ? 'https' : 'http'; + // fallback test for https + if ($this->protocol == 'http' && isset($_SERVER["HTTP_USESSL"]) && $_SERVER["HTTP_USESSL"]) { + $this->protocol = 'https'; + } // CLIs dont have a domain argument if (isset($_SERVER['HTTP_HOST'])) { $this->domain = $_SERVER['HTTP_HOST'];