diff --git a/classes/Locator.php b/classes/Locator.php index 37c2eec711434ad3c63b746673b1ff58b4c7505a..d783178aca26ba4dd24365ccb7bd4c827ebacd8f 100644 --- a/classes/Locator.php +++ b/classes/Locator.php @@ -27,7 +27,8 @@ class Locator { } 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 {