All shortened URLs must expire 10 days after creation.
expiresAt.expiresAt = createdAt + 10 daysRedirect endpoint must enforce:
now <= expiresAt: allow redirect.now > expiresAt: return 410 Gone.If current date > expiresAt → Return 410 Gone
flowchart LR
start([Current Date]) --> expAt[ExpiresAt]
expAt -- Return --> res([410 error])
If (new Date() > url.expiresAt) {
return res.status(410).json({
error: "Link expired"
});
}