Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix: serve desktop bundle for /verify on mobile UA (#17019)

Inneie44f54e445b6
diff --git a/src/libs/next/proxy/define-config.ts b/src/libs/next/proxy/define-config.ts
index 771048a5bb5..736f0fbf443 100644
--- a/src/libs/next/proxy/define-config.ts
+++ b/src/libs/next/proxy/define-config.ts
@@ -89,15 +89,18 @@ export function defineConfig() {
locale,
});
- // Share pages are responsive on their own; always serve the desktop bundle
+ // These pages are responsive on their own; always serve the desktop bundle
// so mobile UA does not land on mobile-specific routes.
- const isSharePath = url.pathname === '/share' || url.pathname.startsWith('/share/');
+ const desktopOnlyPaths = ['/share', '/verify'];
+ const isDesktopOnlyPath = desktopOnlyPaths.some(
+ (path) => url.pathname === path || url.pathname.startsWith(`${path}/`),
+ );
const safeLocale = toSafeLocale(locale);
// 2. Create normalized preference values
const route = RouteVariants.serializeVariants({
- isMobile: !isSharePath && device.type === 'mobile',
+ isMobile: !isDesktopOnlyPath && device.type === 'mobile',
locale: safeLocale,
});