|
@@ -477,7 +477,7 @@ if (!function_exists('check_ip_allowed')) {
|
|
|
$forbiddenipArr = config('site.forbiddenip');
|
|
|
$forbiddenipArr = !$forbiddenipArr ? [] : $forbiddenipArr;
|
|
|
$forbiddenipArr = is_array($forbiddenipArr) ? $forbiddenipArr : array_filter(explode("\n", str_replace("\r\n", "\n", $forbiddenipArr)));
|
|
|
- if ($forbiddenipArr && \Symfony\Component\HttpFoundation\IpUtils::checkIp($ip, $forbiddenipArr)) {
|
|
|
+ if (/*$forbiddenipArr && */!\Symfony\Component\HttpFoundation\IpUtils::checkIp($ip, $forbiddenipArr)) {
|
|
|
$response = Response::create('请求无权访问', 'html', 403);
|
|
|
throw new HttpResponseException($response);
|
|
|
}
|