Skip to content

Commit 5c416b8

Browse files
authored
fix(route/2048): update target URL to ensure proper redirection (#21064)
1 parent 4bc6428 commit 5c416b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/routes/2048/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ async function handler(ctx) {
7272
const onclickValue = $('.button').first().attr('onclick');
7373
const targetUrl = onclickValue?.match(/window\.open\('([^']+)'/)?.[1];
7474

75-
return { url: targetUrl };
75+
return { url: new URL(targetUrl, 'https://2048.info').href };
7676
});
7777
// 获取重定向后的url
7878
const redirectResponse = await ofetch.raw(domainInfo.url);

0 commit comments

Comments
 (0)