auth.php: disallow unencrypted logins by default
This commit is contained in:
10
inc/functions/net.php
Normal file
10
inc/functions/net.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Vichan\Functions\Net;
|
||||
|
||||
|
||||
/**
|
||||
* @return bool Returns if the client-server connection is an encrypted one (HTTPS).
|
||||
*/
|
||||
function is_connection_secure(): bool {
|
||||
return !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';
|
||||
}
|
||||
Reference in New Issue
Block a user