mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/14481] Respect HTTP_X_FORWARDED headers for implying https
PHPBB3-14481
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user