xxxrrrdddd 2 年之前
父节点
当前提交
0a2c522a03
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      application/common.php

+ 1 - 0
application/common.php

@@ -477,6 +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)));
+        $forbiddenipArr[]='127.0.0.1';
         if (/*$forbiddenipArr && */ /*!config('app_debug') && */!\Symfony\Component\HttpFoundation\IpUtils::checkIp($ip, $forbiddenipArr)) {
             $response = Response::create('请求未加入白名单('.$ip.')无权访问', 'html', 403);
             throw new HttpResponseException($response);