fixed failed jobs

This commit is contained in:
DigitalInfinity committed 2026-05-27 00:15:55 +02:00
1 parent 5f62563bac
commit 99c6f5774f
3 files changed
+31 -6

No files matched your search

+19
View File
@@ -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);
}
}