(--')pwD
(--')pwD
FFilament
Created by (--')pwD on 10/29/2024 in #❓┊help
Filament routing
I think I figured it out. I added a middleware, as you suggested to filaments AdminPanelProvider.php. That middleware checks if the host I'm accessing is present on the central domains. If not, a 403 is shown.
public function handle(Request $request, Closure $next): Response
{
$centralDomains = config('tenancy.central_domains');

if (! in_array($request->getHost(), $centralDomains)) {
abort(403, 'Unauthorized access to the admin area.');
}

return $next($request);
}
public function handle(Request $request, Closure $next): Response
{
$centralDomains = config('tenancy.central_domains');

if (! in_array($request->getHost(), $centralDomains)) {
abort(403, 'Unauthorized access to the admin area.');
}

return $next($request);
}
2 replies