From b12378a7d953e1acd0ab74240d4d2da471dcb282 Mon Sep 17 00:00:00 2001 From: Chris Burgess Date: Tue, 9 Oct 2018 18:16:24 +1300 Subject: [PATCH] GL-425: Log a message if CiviCRM thinks SSL is not enabled The enableSSL setting doesn't reliably detect the presence of SSL (especially when behind SSL terminating proxies). This log message will allow people affected by this behaviour to more readily debug it, because CiviCRM will give them a clue to work with. See https://lab.civicrm.org/dev/core/issues/425 --- CRM/Utils/System.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CRM/Utils/System.php b/CRM/Utils/System.php index fb5bb879ea..d4d5d69e1f 100644 --- a/CRM/Utils/System.php +++ b/CRM/Utils/System.php @@ -1191,6 +1191,8 @@ class CRM_Utils_System { ) { // ensure that SSL is enabled on a civicrm url (for cookie reasons etc) $url = "https://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; + // @see https://lab.civicrm.org/dev/core/issues/425 if you're seeing this message. + Civi::log()->warning('CiviCRM thinks site is not SSL, redirecting to {url}', ['url' => $url]); if (!self::checkURL($url, TRUE)) { if ($abort) { CRM_Core_Error::fatal('HTTPS is not set up on this machine'); -- 2.25.1