From cee8dc2a3b9e93b9b26f746a73b32080348e06a5 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 24 May 2023 08:04:34 -0400 Subject: [PATCH] Add support for reverse proxy to system.force_ssl feature --- src/App.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/App.php b/src/App.php index 249c9f66ac..8d253ec76f 100644 --- a/src/App.php +++ b/src/App.php @@ -581,6 +581,7 @@ class App // Force SSL redirection if ($this->config->get('system', 'force_ssl') && (empty($server['HTTPS']) || $server['HTTPS'] === 'off') && + (empty($server['HTTP_X_FORWARDED_PROTO']) || $server['HTTP_X_FORWARDED_PROTO'] === 'http') && !empty($server['REQUEST_METHOD']) && $server['REQUEST_METHOD'] === 'GET') { System::externalRedirect($this->baseURL . '/' . $this->args->getQueryString()); -- 2.39.5