🐛 Fixing a bug.

This commit is contained in:
WispX
2020-03-19 07:37:26 +08:00
parent 35e7cb51a7
commit cb5f2f8bce
+8 -8
View File
@@ -18,14 +18,14 @@ class Initialize
if ($request->controller(true) !== 'install' || $request->action(true) !== 'index') {
return redirect(url('install/index'));
}
}
// 检测封禁IP
$banIp = $this->getConfig('ban_ip');
if ($banIp) {
$ips = explode(',', str_replace('', ',', $banIp));
if ($this->banIp($request->ip(), $ips)) {
throw new HttpResponseException(Response::code(403));
} else {
// 检测封禁IP
$banIp = $this->getConfig('ban_ip');
if ($banIp) {
$ips = explode(',', str_replace('', ',', $banIp));
if ($this->banIp($request->ip(), $ips)) {
throw new HttpResponseException(Response::code(403));
}
}
}