Skip to content

Commit

Permalink
disable ua for public urls
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshshettyin committed Jan 15, 2025
1 parent adfdf99 commit 43d36b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/[short_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export async function GET(req: NextRequest) {
const long_url = await getLongUrl(shortCode);

if (!!long_url) {
await publishUserAgent(req, shortCode);
if (!checkIfShortCodePublic(shortCode)) {
await publishUserAgent(req, shortCode);
}
return Response.redirect(long_url, 301);
}

Expand Down

0 comments on commit 43d36b4

Please sign in to comment.