From d4c12a0ddd691092ad6d765729946cf4df738c94 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 21 Nov 2019 22:35:03 +0800 Subject: [PATCH] update --- app/Http/Controllers/ClientController.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/ClientController.php b/app/Http/Controllers/ClientController.php index a3929b2d..44eec604 100755 --- a/app/Http/Controllers/ClientController.php +++ b/app/Http/Controllers/ClientController.php @@ -23,14 +23,16 @@ class ClientController extends Controller } } } - if(strpos($_SERVER['HTTP_USER_AGENT'], 'Quantumult%20X') !== false) { - die($this->quantumultX($user, $server)); - } - if(strpos($_SERVER['HTTP_USER_AGENT'], 'Quantumult') !== false) { - die($this->quantumult($user, $server)); - } - if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'clash') !== false) { - die($this->clash($user, $server)); + if(isset($_SERVER['HTTP_USER_AGENT'])) { + if(strpos($_SERVER['HTTP_USER_AGENT'], 'Quantumult%20X') !== false) { + die($this->quantumultX($user, $server)); + } + if(strpos($_SERVER['HTTP_USER_AGENT'], 'Quantumult') !== false) { + die($this->quantumult($user, $server)); + } + if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'clash') !== false) { + die($this->clash($user, $server)); + } } die($this->origin($user, $server)); }