Design: a better redirect solution #194
Labels
eng design
Issues requiring engineering design
enhancement
New feature or request
infra
Infrastructure
As a shortlink service, the key function is the
redirect
. For examplelet's assume our endpoint is
zgzg.link
. When user visitszgzg.link/some-existing-link
, it should redirect the user to the long link by querying what's stored under thegoLink="some-existing-link"
. When user visitszgzg.link/some-nonexisting-link
, it should redirect the user to the/edit/some-nonexisting-link
page so user can start immediately creating the longer form of links.The current technical solution is here
It might not be ideal to conduct such redirect behavior at
nuxtServerInit
because it already start the rendering. I think it could happen in theexpress
routing level, which provide better caching for load testing, simplified route configuration, avoid the buggy and hacky solution likeThe text was updated successfully, but these errors were encountered: