summaryrefslogtreecommitdiff
path: root/app/Core/Request.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Core/Request.php')
-rw-r--r--app/Core/Request.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/Core/Request.php b/app/Core/Request.php
index 1b643208..c7ca3184 100644
--- a/app/Core/Request.php
+++ b/app/Core/Request.php
@@ -125,6 +125,20 @@ class Request
}
/**
+ * Check if the page is requested through HTTPS
+ *
+ * Note: IIS return the value 'off' and other web servers an empty value when it's not HTTPS
+ *
+ * @static
+ * @access public
+ * @return boolean
+ */
+ public static function isHTTPS()
+ {
+ return isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== '' && $_SERVER['HTTPS'] !== 'off';
+ }
+
+ /**
* Return a HTTP header value
*
* @access public