P6: link previews read by the server, as the owner decided
- A public post that links to a page gets a preview card: from the post's own data first (FEP-8967 Link preview, the object's image, title and summary); otherwise the server reads the page once, 0-60 s after the post arrives, never when someone reads it. OpenGraph and Twitter tags give title, description and image; one LinkPreview per address is cached for 7 days and shared by the whole server, so a fetch never points at a persona. - Lemmy link posts, which carry no title or description, get them filled in. - The page fetch uses the guarded client (public addresses, three redirects, HTML only, first 512 KB). - Federation:FetchLinkPreviews switches page fetching off. - Local public posts get cards too. Checked live: a link to a GoToSocial profile page becomes a card with its title, description and proxied image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
This commit is contained in:
1 parent
fdcf5176bc
commit
001fdac3be
17 files changed
+314
-13
No files matched your search
@@ -128,6 +128,18 @@ Received `summary` is a content warning only on a `Note` or `Question`, or when
|
||||
Visibility is expressed in `to`/`cc` the way Mastodon does it: public, unlisted, followers-only and direct. Inbound
|
||||
followers-only posts are recognised by the author's own `followers` collection.
|
||||
|
||||
## Link previews
|
||||
|
||||
For a public post that links to a page, PrivaPub builds a preview card. It uses, in order:
|
||||
1. a Link attachment's own `preview` (FEP-8967) or the post's own image, title and summary;
|
||||
2. otherwise, the linked page, read once by the server between 0 and 60 seconds after the post arrives (never when
|
||||
someone reads it), with an `Accept: text/html` request that reads at most 512 KB, through the same address checks as
|
||||
every other fetch.
|
||||
|
||||
The page's OpenGraph and Twitter tags give the title, description and image; the result is cached per address for 7
|
||||
days and shared by every account on the server. Images are served to clients only through PrivaPub's media proxy.
|
||||
`Federation:FetchLinkPreviews=false` turns page fetching off.
|
||||
|
||||
## Local-only posts
|
||||
|
||||
Posts with a location (shown to nearby users of this server) never leave the server, in any form.
|
||||
|
||||
Reference in new issue
Block a user