News for hackers. Stuff that matters.
Re:Show HN: I created a URL shortener that can be entirely h... by anuila on Monday November 16, 2020 @07:05PM (#25118777)
Bad for so many reasons (including abuse of GitHub issues, spam, and the ability to change the URL the short link points to)

If you want your own private shortener, I have a better idea:

Use GitHub Pages and create a `/1/index.html` (where 1 is the short link name) and add a “refresh” meta tag in it. Completely static and no build/JS necessary.

This could be opened up to others by combining it with issues and GitHub Actions, but who wants that?

Another better idea for a private URL shortener is hardcoding a list of URLs in a CloudFlare Worker. Much faster and with real 301 redirects.

There are no comments on this comment yet.