diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2016-02-16 15:57:46 +0100 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2016-02-16 16:33:19 +0100 |
| commit | 9eedf290217ac749224950736087840e149a2b9a (patch) | |
| tree | f7b1a923568e4f92d647f31a01749751a6125c14 /phpBB/includes/functions.php | |
| parent | accf8f8625ca1c730ee0bb09e1ecc44526c124d3 (diff) | |
| download | forums-9eedf290217ac749224950736087840e149a2b9a.tar forums-9eedf290217ac749224950736087840e149a2b9a.tar.gz forums-9eedf290217ac749224950736087840e149a2b9a.tar.bz2 forums-9eedf290217ac749224950736087840e149a2b9a.tar.xz forums-9eedf290217ac749224950736087840e149a2b9a.zip | |
[ticket/14481] Use port 443 if https is specified in x-forwarded-proto
PHPBB3-14481
Diffstat (limited to 'phpBB/includes/functions.php')
| -rw-r--r-- | phpBB/includes/functions.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index b6334a2bca..787cb7e301 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2234,6 +2234,12 @@ function generate_board_url($without_script_path = false) $server_name = $user->host; $server_port = $request->server('SERVER_PORT', 0); + $forwarded_proto = $request->server('HTTP_X_FORWARDED_PROTO'); + + if (!empty($forwarded_proto) && $forwarded_proto === 'https') + { + $server_port = 443; + } // Forcing server vars is the only way to specify/override the protocol if ($config['force_server_vars'] || !$server_name) |
