mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-01 10:52:18 +01:00
More robust https check.
This commit is contained in:
parent
c5983f13eb
commit
0749db6e8f
@ -34,7 +34,9 @@ require_once 'ykval-synclib.php';
|
||||
header('content-type: text/plain');
|
||||
|
||||
$ipaddr = $_SERVER['REMOTE_ADDR'];
|
||||
$https = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" ? TRUE : FALSE);
|
||||
|
||||
$https = (array_key_exists('HTTPS', $_SERVER) === TRUE
|
||||
&& strtolower($_SERVER['HTTPS']) !== 'off' ? TRUE : FALSE);
|
||||
|
||||
$myLog = new Log('ykval-verify');
|
||||
$myLog->addField('ip', $ipaddr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user