aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/request/request.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-02-15 21:40:52 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-02-15 22:06:25 +0100
commitaccf8f8625ca1c730ee0bb09e1ecc44526c124d3 (patch)
treed99ca148a268002187c1637e8762fcdef9e45c21 /phpBB/phpbb/request/request.php
parent17e21d5140ccb99363a32bd64c32af6012c1ce97 (diff)
downloadforums-accf8f8625ca1c730ee0bb09e1ecc44526c124d3.tar
forums-accf8f8625ca1c730ee0bb09e1ecc44526c124d3.tar.gz
forums-accf8f8625ca1c730ee0bb09e1ecc44526c124d3.tar.bz2
forums-accf8f8625ca1c730ee0bb09e1ecc44526c124d3.tar.xz
forums-accf8f8625ca1c730ee0bb09e1ecc44526c124d3.zip
[ticket/14481] Respect HTTP_X_FORWARDED headers for implying https
PHPBB3-14481
Diffstat (limited to 'phpBB/phpbb/request/request.php')
-rw-r--r--phpBB/phpbb/request/request.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/phpbb/request/request.php b/phpBB/phpbb/request/request.php
index 56ce3999ed..4cac6fbaea 100644
--- a/phpBB/phpbb/request/request.php
+++ b/phpBB/phpbb/request/request.php
@@ -325,7 +325,9 @@ class request implements \phpbb\request\request_interface
*/
public function is_secure()
{
- return $this->server('HTTPS') == 'on';
+ $https = $this->server('HTTPS');
+ $https = $this->server('HTTP_X_FORWARDED_PROTO') === 'https' ? 'on' : $https;
+ return !empty($https) && $https !== 'off';
}
/**