From b99be29a9d3cd9eb53064a575182ecaa53375fbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Wed, 7 Feb 2018 21:24:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E7=94=A8=E6=9D=83=E9=99=90=E6=A3=80?= =?UTF-8?q?=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/PdAuth/Middleware/Authenticate.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/PdAuth/Middleware/Authenticate.php b/src/PdAuth/Middleware/Authenticate.php index 2ac463e..9bbfa80 100644 --- a/src/PdAuth/Middleware/Authenticate.php +++ b/src/PdAuth/Middleware/Authenticate.php @@ -91,18 +91,19 @@ class Authenticate // } // } - if (in_array($path, $match)) { - return $next($request); - } +// if (in_array($path, $match)) { +// return $next($request); +// } - if ($request->isXmlHttpRequest()) { - return response()->json([ - 'code' => 403, - 'msg' => '无权访问,请联系管理员授权', - 'data' => null, - ]); - } - api_abort(403, '无权访问,请联系管理员授权'); +// if ($request->isXmlHttpRequest()) { +// return response()->json([ +// 'code' => 403, +// 'msg' => '无权访问,请联系管理员授权', +// 'data' => null, +// ]); +// } +// api_abort(403, '无权访问,请联系管理员授权'); + return $next($request); } }