Enhanced https check (#132)

* Enhanced https check

* Update config.php
This commit is contained in:
Roman Kelesidis 2023-04-05 14:36:11 +07:00 committed by GitHub
parent 5518ce99b9
commit 07dd40b399
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -333,7 +333,7 @@ $page_cfg['show_sidebar2'] = array(
// Cookie
$bb_cfg['cookie_domain'] = in_array($domain_name, array(getenv('SERVER_ADDR'), 'localhost')) ? '' : ".$domain_name";
$bb_cfg['cookie_secure'] = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443;
$bb_cfg['cookie_secure'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') || (isset($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] === 'https') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')) ? 1 : 0;
$bb_cfg['cookie_prefix'] = 'bb_'; // 'bb_'
// Sessions