From e342ce978809adef9af7ceabc4a3583755675334 Mon Sep 17 00:00:00 2001 From: Robert Sink Date: Sat, 6 Jun 2015 00:31:39 -0400 Subject: [PATCH 1/2] Make sure HTTPS is not set to off Current check only says if HTTPS isn't empty set it to https://, but what if its not empty but off? Should direct that traffic to http:// --- resources/DirectoryLister.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/DirectoryLister.php b/resources/DirectoryLister.php index 387e846..c7bdc7c 100644 --- a/resources/DirectoryLister.php +++ b/resources/DirectoryLister.php @@ -682,7 +682,11 @@ class DirectoryLister { // Get the server protocol if (!empty($_SERVER['HTTPS'])) { - $protocol = 'https://'; + if ($_SERVER['HTTPS']!=="off" { + $protocol = 'https://'; + } else { + $protocol = 'http://'; + } } else { $protocol = 'http://'; } From c9e67c3bfeb8c08d83662e739e8f0b6da06a9d43 Mon Sep 17 00:00:00 2001 From: Robert Sink Date: Sat, 6 Jun 2015 01:13:39 -0400 Subject: [PATCH 2/2] Another Option if you want to be judicious w/ adding lines of code, I offer this alternative. --- resources/DirectoryLister.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/resources/DirectoryLister.php b/resources/DirectoryLister.php index c7bdc7c..5615b77 100644 --- a/resources/DirectoryLister.php +++ b/resources/DirectoryLister.php @@ -681,12 +681,8 @@ class DirectoryLister { protected function _getAppUrl() { // Get the server protocol - if (!empty($_SERVER['HTTPS'])) { - if ($_SERVER['HTTPS']!=="off" { - $protocol = 'https://'; - } else { - $protocol = 'http://'; - } + if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']!=="off") { + $protocol = 'https://'; } else { $protocol = 'http://'; }