http protocol fix

This commit is contained in:
Roman Hergenreder 2020-06-26 19:36:03 +02:00
parent 7bf88a7c98
commit 80f68760b3

@ -3,7 +3,7 @@
define("WEBBASE_VERSION", "0.1.0-alpha");
function getProtocol() {
return stripos($_SERVER['SERVER_PROTOCOL'], 'https') === 0 ? 'https' : 'http';
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https" : "http";
}
function generateRandomString($length): string {