1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-01 01:52:18 +01:00

More robust https check.

This commit is contained in:
Jean Paul Galea 2015-07-21 20:47:30 +00:00
parent c5983f13eb
commit 0749db6e8f

View File

@ -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);