Recognises links to this site's own pages. The self provider previews them from the database, remote/fetch.ts accepts them as dump links even on a private host such as localhost, and migration 0021 rewrote the v3 ones in stored text.

Functions

f
isSelfHost(host: string): boolean

Checks whether host (with its port, as URL.host gives it) is where this site is served, at its public URL or its frontend's.

f
isSelfUrl(url: URL): boolean

Checks whether url links to one of this site's own dump, user or playlist pages, by parsePagePath; an editor doesn't count. Matched on the host as well as the path: /@bob on some other site is someone else's page, not ours.