修改异常IP判断条件

This commit is contained in:
兔姬桑
2020-09-13 10:16:21 +08:00
parent e6da11dede
commit 795e9c0ffc

View File

@@ -48,7 +48,7 @@ class isForbidden
$ipLocation = IP::getIPInfo($ip);
// 拒绝无IP请求
if (empty($ipLocation) || empty($ipLocation['city'])) {
if ( ! $ipLocation || empty(array_filter($ipLocation))) {
return Response::view(
'auth.error',
['message' => trans('error.ForbiddenAccess')],