check for HTTPS connection

This commit is contained in:
1Day 2022-01-26 13:24:03 +01:00
parent 4280084cb5
commit 2947df6ce3
2 changed files with 8 additions and 0 deletions

View file

@ -17,6 +17,13 @@ function checkPhpVersion()
return "not OK";
}
function checkHTTPS()
{
return
(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
|| $_SERVER['SERVER_PORT'] == 443;
}
function getMySQLVersion()
{
global $requirements;

View file

@ -63,6 +63,7 @@ if (!isset($_GET['step'])) {
?>
<p class="login-box-msg">This installer will lead you through the most crucial Steps of Controlpanel.gg`s
setup</p>
<p class="<?php print(checkHTTPS() == true ? "ok" : "notok"); ?>">HTTPS is required</p>
<p class="<?php print(checkPhpVersion() === "OK" ? "ok" : "notok"); ?>"> php
version: <?php echo phpversion(); ?> (required <?php echo $requirements["php"]; ?>)</p>