Skip to content

Commit

Permalink
fix: redirecting has double slashes (//)
Browse files Browse the repository at this point in the history
  • Loading branch information
okdargy committed Jan 3, 2024
1 parent ef27c73 commit c2ab7bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async function handleVideo(c: any): Promise<Response> {
return new Response('', {
status: 302,
headers: {
'Location': `https://www.tiktok.com/${awemeIdPattern.test(videoId) ? c.req.path : 't'}/${videoId}`
'Location': 'https://www.tiktok.com' + `${awemeIdPattern.test(videoId) ? c.req.path : '/t/' + videoId}`
}
})
}
Expand Down

0 comments on commit c2ab7bc

Please sign in to comment.