Gives links to the site rich previews in chat apps and social sites, which
don't run the app. It answers a link to a dump, a profile or a public
playlist with index.html carrying that page's Open Graph and Twitter card
tags, and a link by a former name with a 301 to the current one. main.ts
installs it before the routers.
Serves index.html with the tags of the dump, user or public playlist a
path names (parsePagePath), and passes the request on when it names none
that exists or the visitor may see. A path naming one by a former name, a
user's or a slug, or in another case, gets a 301 to its current path. The
page's URL is on FRONTEND_URL and the images' on PUBLIC_URL, not on the
request's origin, which a reverse proxy may have rewritten to an internal
host or plain http.
Usage
import * as mod from "api/middleware/og.ts";