Fix: only preconnect nitro URL if absolute (prevents crash on relative URLs like /nitro-client/)

This commit is contained in:
openhands committed 2026-07-09 19:52:19 +02:00
1 parent 0ac3e4353a
commit c68fccceeb
1 file changed
+1 -1
+1 -1
View File
@@ -70,7 +70,7 @@ export default async function RootLayout({ children }: { children: ReactNode })
<script src="/scripts/theme-init.js" />
<link rel="preconnect" href="https://www.habbo.com" />
<link rel="dns-prefetch" href="https://www.habbo.com" />
{nitroUrl ? (
{nitroUrl && nitroUrl.startsWith("http") ? (
<link rel="preconnect" href={new URL(nitroUrl).origin} />
) : null}
</head>