diff options
Diffstat (limited to 'core/Url.php')
-rw-r--r-- | core/Url.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Url.php b/core/Url.php index 2a301a9b46..a0d480da33 100644 --- a/core/Url.php +++ b/core/Url.php @@ -711,6 +711,10 @@ class Url */ protected static function getCurrentSchemeFromRequestHeader() { + if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'http') { + return 'http'; + } + if ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] === true)) || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') ) { |