Skip to content

Commit

Permalink
fix: abandon tracking of destination URL
Browse files Browse the repository at this point in the history
  • Loading branch information
rnmeow committed Dec 18, 2024
1 parent fc2dc25 commit 8327693
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/modules/api/v0/handlers/shorten.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,6 @@ const handlers = factory.createHandlers(logger(), async (ctxt) => {
)
}

const { ok, status } = await fetch(destUrl, {
method: 'GET',
})

if (!ok) {
throw createRfcHttpError(400, 'Destination URL is not accessible')
}
if ([301, 302, 303, 307, 308].includes(status)) {
throw createRfcHttpError(400, 'Destination URL redirects are not allowed')
}

if (body.slug && typeof body.slug !== 'string') {
throw createRfcHttpError(400, 'Slug must be a string')
}
Expand Down

0 comments on commit 8327693

Please sign in to comment.