Polyfill unreliable REQUEST_SCHEME behavior

This commit is contained in:
Alma Armas 2020-09-29 12:58:16 -07:00
parent e70f392b1c
commit 7be8b25a21

View file

@ -127,11 +127,14 @@ return (function() {
setlocale(LC_TIME, "POSIX"); setlocale(LC_TIME, "POSIX");
if(empty($_SERVER["REQUEST_SCHEME"]))
$_SERVER["REQUEST_SCHEME"] = empty($_SERVER["HTTPS"]) ? "HTTP" : "HTTPS";
$showCommitHash = true; # plz remove when release $showCommitHash = true; # plz remove when release
if(is_dir($gitDir = OPENVK_ROOT . "/.git") && $showCommitHash) if(is_dir($gitDir = OPENVK_ROOT . "/.git") && $showCommitHash)
$ver = trim(`git --git-dir="$gitDir" log --pretty="%h" -n1 HEAD` ?? "Unknown version") . "-nightly"; $ver = trim(`git --git-dir="$gitDir" log --pretty="%h" -n1 HEAD` ?? "Unknown version") . "-nightly";
else else
$ver = "Build 15"; $ver = "Build 15";
define("OPENVK_VERSION", "Altair Preview ($ver)", false); define("OPENVK_VERSION", "Altair Preview ($ver)", false);
define("OPENVK_DEFAULT_PER_PAGE", 10, false); define("OPENVK_DEFAULT_PER_PAGE", 10, false);