-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Someone posted a Streamable link today and it reminded me of how short their URLs are. Is it possible to generate a 6-8 character long URL that redirects to the full URL without using third-party websites/services? Since you'd be redirecting to the long URLs, if you change your password not only would the original links fail to load anything now, so would the shorter URLs because they just redirect to the full URL.
I did find an open source service called Kutt and they have an API you can generate keys for. Now, that isn't really self hosted because you're relying on them to redirect the URL for you, but that might be an easier way of doing it? I just thought there could be a way to enable/disable short URLs when you load the docker image and then if you enable it, every time you copy a URL, it would generate a 6-8 digit URL and then whenever Clipface sees someone using that short URL, it redirects them to the real one in a browser.
It just looks a lot cleaner in a chat. I'll post a comparison below.
EDIT: That imgur link just made me think of something, you could make it easy for Clipface to recognize a short URL by replacing the /watch/ part of a URL with something like /u/ or another letter. Like how imgur uses /a/. Right? I don't know. I really need to learn how to code. 😅
EDIT2: Actually, it wouldn't even have to be a starting argument on Docker. It could just be a button next to the other URL buttons: https://imgur.com/MCmzbr7
EDIT3: Now that I think about it, the URLs can't really be randomly generated. They'd have to be generated similarly to how you generate the public URLs.