Skip to content

Commit

Permalink
Fix reversed check
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 committed Nov 15, 2021
1 parent 9fd066c commit 1a40134
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function plugin_camerainput_install()
{
$is_https = !empty($_SERVER['HTTPS']) || (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https');
$is_localhost = in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1']) || (!empty($_SERVER['HTTP_HOST']) && strpos($_SERVER['HTTP_HOST'], 'localhost') !== false);
if ($is_https || $is_localhost) {
if (!$is_https && !$is_localhost) {
echo 'This plugin requires GLPI be served over HTTPS';
return false;
}
Expand Down

0 comments on commit 1a40134

Please # to comment.