From 1a4013445fbb71742731b6f8c38bef0cf7805a0e Mon Sep 17 00:00:00 2001 From: cconard96 Date: Mon, 15 Nov 2021 05:42:03 -0500 Subject: [PATCH] Fix reversed check --- hook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hook.php b/hook.php index 79d7aff..ed156f0 100644 --- a/hook.php +++ b/hook.php @@ -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; }