🐛 Fixing a bug.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user