fixed failed jobs
This commit is contained in:
1 parent
5f62563bac
commit
99c6f5774f
3 files changed
+31
-6
No files matched your search
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class RestrictToSubnet
|
||||
{
|
||||
public function handle(Request $request, Closure $next, string $subnet = '192'): Response
|
||||
{
|
||||
if (!str_starts_with($request->ip(), $subnet) && !str_starts_with($request->ip(), "127")) {
|
||||
abort(403);
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user