From 2167fd209a3cc46ea77fc64909ff8adf71ec6ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=9C=E4=BA=91?= Date: Wed, 3 Jan 2024 20:20:31 +0800 Subject: [PATCH] =?UTF-8?q?perf(exception):=20=E5=8F=96=E6=B6=88=E4=BA=86?= =?UTF-8?q?=E5=BF=85=E9=A1=BB=E6=98=AF=20apifox/postman=20=E7=9A=84?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李东云 --- src/Exceptions/Handler/CommonHandler.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Exceptions/Handler/CommonHandler.php b/src/Exceptions/Handler/CommonHandler.php index 2d02be6..c39c34e 100644 --- a/src/Exceptions/Handler/CommonHandler.php +++ b/src/Exceptions/Handler/CommonHandler.php @@ -72,10 +72,8 @@ class CommonHandler extends ExceptionHandler $message_name = config('common.response.message_name'); $is_testing = config('app_status') === true; $this->request?->url(); - $is_debug = $this->request?->hasHeader('Postman-Token') || str_starts_with( - $this->request?->header('User-Agent', ''), - 'apifox' - ); + + $is_debug = $is_testing; $error_type = $throwable::class; $request_time = Carbon::now()->toDateTimeString(); $request_data = Json::encode($this->request?->getParsedBody());