summaryrefslogtreecommitdiff
path: root/app/Core
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-02-28 20:00:11 -0500
committerFrederic Guillot <fred@kanboard.net>2016-02-28 20:00:11 -0500
commita22476ffdfe568e9006ef243c4aa3a8cf0bc627a (patch)
treef2737ccefe02e347b5693c83a933c56fc97018b0 /app/Core
parent333bec112ae34e3e8435153355f3ae0ba407f515 (diff)
Added support for HTTP header "X-Forwarded-Proto: https"
Diffstat (limited to 'app/Core')
-rw-r--r--app/Core/Http/Request.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Core/Http/Request.php b/app/Core/Http/Request.php
index 1b3036d5..7f1399e6 100644
--- a/app/Core/Http/Request.php
+++ b/app/Core/Http/Request.php
@@ -211,7 +211,11 @@ class Request extends Base
*/
public function isHTTPS()
{
- return isset($this->server['HTTPS']) && $this->server['HTTPS'] !== '' && $this->server['HTTPS'] !== 'off';
+ if ($this->getServerVariable('HTTP_X_FORWARDED_PROTO') === 'https') {
+ return true;
+ }
+
+ return $this->getServerVariable('HTTPS') !== '' && $this->server['HTTPS'] !== 'off';
}
/**