check for HTTPS connection
check for HTTPS connection
This commit is contained in:
commit
ed1dcddee5
2 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue