From 3cedc9686f0bfd4ce584a8d08dae513e600f3247 Mon Sep 17 00:00:00 2001 From: coralchu Date: Wed, 11 Nov 2020 15:23:28 +0800 Subject: [PATCH] bug fix --- src/Common/Utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/Utils.php b/src/Common/Utils.php index 497a0e2..dc4ca1a 100644 --- a/src/Common/Utils.php +++ b/src/Common/Utils.php @@ -32,7 +32,7 @@ public static function requestFrom() $server = $request->getServerParams(); $headersStr = strtolower(json_encode($headers, 256)); $serverStr = strtolower(json_encode($server, 256)); - if (strstr($server['HTTP_USER_AGENT'], 'miniprogram') || strstr($headersStr['X-App-Platform'], 'miniprogram')) { + if (strstr($serverStr, 'miniprogram') || strstr($headersStr, 'miniprogram')) { return PubEnum::MinProgram; } app('log')->info('get_request_from_for_test_' . json_encode(['headers' => $headers, 'server' => $server], 256));