Commit ac467046 by 杨树贤

调试

parent e6935be8
Showing with 2 additions and 0 deletions
......@@ -23,11 +23,13 @@ class CheckIp
return $next($request);
}
$ip = $request->ip();
Log::warning($ip);
$reader = new Reader(storage_path('app/GeoLite2-Country.mmdb'));
$record = $reader->get($ip);
if (empty($record)) {
return $next($request);
}
Log::warning(json_encode($record));
if (in_array($record['country']['iso_code'], config('field.disable_ip_iso_code'))) {
view()->share('is_disable_ip', 1);
return redirect()->to('/info');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment