This commit is contained in:
2021-03-19 18:28:59 +08:00
parent eeab6d5078
commit 4c4e0afd54
3 changed files with 12 additions and 5 deletions
+2 -3
View File
@@ -571,9 +571,6 @@ class Node extends HttpService
/**
* @return mixed
* @throws ComponentException
* @throws NotFindClassException
* @throws ReflectionException
* @throws Exception
*/
private function httpFilter(): mixed
@@ -589,6 +586,8 @@ class Node extends HttpService
$filter = Snowflake::app()->get('filter');
$validator = $filter->check(get_class($class), $method);
if ($validator instanceof Validator && !$validator->validation()) {
response()->statusCode = 401;
return Json::to(401, $validator->getError());
}
} catch (Throwable $throwable) {