summaryrefslogtreecommitdiff
path: root/app/Core/Request.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-14 22:44:25 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-14 22:44:25 -0500
commitb081288188bb1744c9d7bd075aa5936e0ccbb9c4 (patch)
tree68008e35eb129f74b9b2a49f6f6076ed02b601c6 /app/Core/Request.php
parent1487cb27634161ef558c367150213bc7077e4198 (diff)
Use Pimple instead of Core\Registry and add Monolog for logging
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