Skip to content
Snippets Groups Projects
Commit fb0f1583 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Handled detection of http/https protocol also behind proxy

parent d1da5794
No related branches found
No related tags found
No related merge requests found
Pipeline #8429 passed
...@@ -27,7 +27,8 @@ class Locator { ...@@ -27,7 +27,8 @@ class Locator {
} }
public function getProtocol(): string { public function getProtocol(): string {
return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ? 'https://' : 'http://'; return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ? 'https://' : (
isset($_SERVER['HTTP_X_FORWARDED_PROTO']) ? $_SERVER['HTTP_X_FORWARDED_PROTO'] . '://' : 'http://');
} }
public function getBasePath(): string { public function getBasePath(): string {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment