From 7be8b25a2110c609eb4ed3ff6ff08be9046c4eb6 Mon Sep 17 00:00:00 2001 From: Alma Armas Date: Tue, 29 Sep 2020 12:58:16 -0700 Subject: [PATCH] Polyfill unreliable REQUEST_SCHEME behavior --- bootstrap.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootstrap.php b/bootstrap.php index 404e5433..b5b4bbec 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -126,12 +126,15 @@ return (function() { require __DIR__ . "/vendor/autoload.php"; setlocale(LC_TIME, "POSIX"); + + if(empty($_SERVER["REQUEST_SCHEME"])) + $_SERVER["REQUEST_SCHEME"] = empty($_SERVER["HTTPS"]) ? "HTTP" : "HTTPS"; $showCommitHash = true; # plz remove when release if(is_dir($gitDir = OPENVK_ROOT . "/.git") && $showCommitHash) $ver = trim(`git --git-dir="$gitDir" log --pretty="%h" -n1 HEAD` ?? "Unknown version") . "-nightly"; else - $ver = "Build 15"; + $ver = "Build 15"; define("OPENVK_VERSION", "Altair Preview ($ver)", false); define("OPENVK_DEFAULT_PER_PAGE", 10, false);