forked from leftypol/leftypol
auth.php: disallow unencrypted logins by default
This commit is contained in:
parent
003152095a
commit
aa99d10f1a
5 changed files with 32 additions and 5 deletions
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';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue