mirror of
https://github.com/friendica/friendica
synced 2024-11-09 16:22:56 +00:00
Add support for reverse proxy to system.force_ssl feature
This commit is contained in:
parent
7b02585b97
commit
cee8dc2a3b
1 changed files with 1 additions and 0 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue