mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Polyfill unreliable REQUEST_SCHEME behavior
This commit is contained in:
parent
e70f392b1c
commit
7be8b25a21
1 changed files with 4 additions and 1 deletions
|
@ -126,12 +126,15 @@ return (function() {
|
||||||
require __DIR__ . "/vendor/autoload.php";
|
require __DIR__ . "/vendor/autoload.php";
|
||||||
|
|
||||||
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);
|
||||||
|
|
Loading…
Reference in a new issue