diff options
Diffstat (limited to 'app/Core/Http/Request.php')
-rw-r--r-- | app/Core/Http/Request.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/Core/Http/Request.php b/app/Core/Http/Request.php index 1b3036d5..e0df2d3c 100644 --- a/app/Core/Http/Request.php +++ b/app/Core/Http/Request.php @@ -29,7 +29,12 @@ class Request extends Base * Constructor * * @access public - * @param \Pimple\Container $container + * @param \Pimple\Container $container + * @param array $server + * @param array $get + * @param array $post + * @param array $files + * @param array $cookies */ public function __construct(Container $container, array $server = array(), array $get = array(), array $post = array(), array $files = array(), array $cookies = array()) { @@ -211,7 +216,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'; } /** |