News for hackers. Stuff that matters.
Re:Show HN: I created a URL shortener that can be entirely h... by diggan on Monday November 16, 2020 @08:16AM (#25111232)
Indeed :)

I think you could catch the infinitive loop client-side as well by comparing what the URL to redirect to is, and comparing it with the current URL. If they are the same, prevent the redirect. Although you would still be able to create loops by using two issues instead. Maybe just comparing the full hostname? If it's nlsn.cf, don't redirect.

Re:Show HN: I created a URL shortener that can be entirely h... by a1369209993 on Monday November 16, 2020 @08:34PM (#25119379)
> Maybe just comparing the full hostname? If it's nlsn.cf, don't redirect.

Doesn't work; eg, make http://someothershorten.er/foo -> http://nlsn.cf/1234 -> http://someothershorten.er/foo.