From: Hypolite Petovan Date: Wed, 24 May 2023 12:04:34 +0000 (-0400) Subject: Add support for reverse proxy to system.force_ssl feature X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cee8dc2a3b9e93b9b26f746a73b32080348e06a5;p=friendica.git Add support for reverse proxy to system.force_ssl feature --- 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());