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