xxxrrrdddd 2 years ago
parent
commit
c3c7a15f44
2 changed files with 3 additions and 2 deletions
  1. 1 1
      application/common.php
  2. 2 1
      application/extra/site.php

+ 1 - 1
application/common.php

@@ -478,7 +478,7 @@ if (!function_exists('check_ip_allowed')) {
         $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)) {
-            $response = Response::create('请求无权访问', 'html', 403);
+            $response = Response::create('请求('.$ip.')无权访问', 'html', 403);
             throw new HttpResponseException($response);
         }
     }

+ 2 - 1
application/extra/site.php

@@ -6,7 +6,8 @@ return array (
   'cdnurl' => '',
   'version' => '1.0.2',
   'timezone' => 'Asia/Shanghai',
-  'forbiddenip' => '127.0.0.1',
+  'forbiddenip' => '127.0.0.1
+112.228.180.93',
   'languages' => 
   array (
     'backend' => 'zh-cn',