alias('/') ->alias('auth/*') ->alias('/invite') ->alias('/login') ->alias('/recover') ->alias('/register/*') ->groups(['web']) ->label('permission', 'public') ->label('scope', 'home') ->inject('request') ->inject('response') ->action(function (Request $request, Response $response) { $fallback = file_get_contents(__DIR__ . '/../../../console/index.html'); // Card SSR if (\str_starts_with($request->getURI(), '/card')) { $urlCunks = \explode('/', $request->getURI()); $userId = $urlCunks[\count($urlCunks) - 1] ?? ''; $domain = $request->getProtocol() . '://' . $request->getHostname(); if (!empty($userId)) { $ogImageUrl = $domain . '/v1/cards/cloud-og?userId=' . $userId; } else { $ogImageUrl = $domain . '/v1/cards/cloud-og?mock=normal'; } $ogTags = [ '