Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Url.php')
-rw-r--r--core/Url.php4
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')
) {