commit 48fe43e55868a1018dbf1f9a8bb65aea59ca6d46 parent ccd9f2a310ca95bbc83e1885ced16a3b98f734d2 Author: markseu <mark2011@mayberg.se> Date: Mon, 20 Jul 2020 17:20:17 +0200 Updated HTTPS detection, thanks Neto Diffstat:
| M | system/extensions/core.php | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/system/extensions/core.php b/system/extensions/core.php @@ -2960,7 +2960,9 @@ class YellowToolbox { // Detect server URL public function detectServerUrl() { - $scheme = !empty($this->getServer("HTTPS")) && $this->getServer("HTTPS")!="off" ? "https" : "http"; + $scheme = "http"; + if ($this->getServer("REQUEST_SCHEME")=="https" || $this->getServer("HTTPS")=="on") $scheme = "https"; + if ($this->getServer("HTTP_X_FORWARDED_PROTO")=="https") $scheme = "https"; $address = $this->getServer("SERVER_NAME"); $port = $this->getServer("SERVER_PORT"); if ($port!=80 && $port!=443) $address .= ":$port";