add support for x-forwarded-proto header
This commit is contained in:
parent
78349b3ae5
commit
7b7596167a
1 changed files with 4 additions and 0 deletions
|
@ -65,6 +65,10 @@ function contact_link(): ?string
|
||||||
*/
|
*/
|
||||||
function is_https_enabled(): bool
|
function is_https_enabled(): bool
|
||||||
{
|
{
|
||||||
|
// check forwarded protocol
|
||||||
|
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
|
||||||
|
$_SERVER['HTTPS']='on';
|
||||||
|
}
|
||||||
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
|
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue