diff --git a/core/util.php b/core/util.php index e0a26af7..8b20139d 100644 --- a/core/util.php +++ b/core/util.php @@ -65,6 +65,10 @@ function contact_link(): ?string */ 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'); }