Answer the question
In order to leave comments, you need to log in
Accessing the site from certain autonomous network IPs?
In fact, here is a list of all facebook IP networks https://api.hackertarget.com/aslookup/?q=AS32934 .
How to get all IP addresses from subnets 31.13.74.0/24 and enter them into the
IP config config
<?php
return [
'127.0.0.1',
];
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class IPAccess{
public function handle(Request $request, \Closure $next)
{
if(!in_array($request->ip(), config('ip'))){
return new response(view('closed'));
//return redirect()->route('closed');
}
return $next($request);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question