initialize(); $request = Request::fromGlobals($config); $guard = new SsrfGuard($config); $http = new HttpClient($config, $guard); $sync = new SyncService($repository, $config, $http, $guard); $sync->ensureDefaultSource(); $auth = new Auth($config, $repository); $adminPath = $request->path === '/admin' || str_starts_with($request->path, '/admin/'); if ($auth->enabled() && $adminPath) { // Public catalog/API/health traffic must not allocate anonymous sessions. $auth->startSession(); } $application = new Application($config, $repository, $auth, $sync, $guard); $application->handle($request)->send();