is(...self::ALWAYS_ALLOWED) || Settings::bool('site.public', true)) { return $next($request); } if ($this->fromManagementNetwork($request) || Auth::guard('operator')->check()) { return $next($request); } return response()->view('coming-soon', [], 503)->withHeaders([ 'Retry-After' => 3600, 'X-Robots-Tag' => 'noindex, nofollow, noarchive', 'Cache-Control' => 'no-store', ]); } private function fromManagementNetwork(Request $request): bool { $ranges = (array) config('admin_access.trusted_ranges', []); return $ranges !== [] && IpUtils::checkIp((string) $request->ip(), $ranges); } }