On Wed, May 31, 2023 at 12:44:14PM +0300, Santtu Lakkala wrote:
> On 25.5.2023 6.47, Spenser Truex wrote:
> > There are a lot of bloated projects that I've found. Any suggestions?
> 
> It uses symbolic links in a directory as a data backend. This should not
> have any race issues, as link creation should be an atomic operation. Note
> that the default is to have 4 character tokens, that are randomly generated,
> so expect collisions if you have a lot of links to shorten.

Tinkered with this a bit more, this "backend" is quite easy for a server,
and I was able to patch the OpenBSD httpd to server the symlinks as redirects
in about 20 lines of code, out of which 3/4 is for making it configurable.

-- 
BR,
  Santtu

Reply via email to