mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/14481] Use port 443 if https is specified in x-forwarded-proto
PHPBB3-14481
This commit is contained in:
parent
accf8f8625
commit
9eedf29021
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue