TryGhost / TryGhost/ActivityPub
ActivityPub admin API should resolve site context by ghost_uuid
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 237
- Forks
- 35
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 60
Description
The ActivityPub admin UI can break when a Ghost site’s configured URL changes, because ActivityPub currently resolves site context from the request Host header.
Example:
- Ghost is initially configured at https://old.example.com
- ActivityPub stores site/account state for old.example.com
- The Ghost site URL is changed to https://new.example.com
- Admin loads from https://new.example.com/ghost
- ActivityPub admin API requests are proxied with Host: new.example.com
- ActivityPub cannot find the existing site row and returns site/auth lookup errors
Example logs:
No site found for 'new.example.com'
No key found for 'new.example.com'
Host-based lookup makes sense for public federation routes, where the URL is part of the ActivityPub actor/object identity. But for authenticated Ghost Admin API requests, the site identity should be stable across URL changes. sites.ghost_uuid seems like the better canonical identifier for admin-context resolution.
Suggested direction:
- Resolve authenticated admin ActivityPub API requests by ghost_uuid, not request host.
- Keep host-based lookup for public federation routes where URL identity matters.
- Handle Ghost URL/domain changes as an explicit actor/domain migration concern, separate from admin API site lookup.
This should prevent the admin UI from breaking after a site URL change while preserving correct federation behavior.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing authenticated admin ActivityPub API requests and how they resolve site context from the request Host header. Check how sites.ghost_uuid is available for this lookup, while preserving host-based resolution for public federation routes. Done means admin requests continue to find the site after its URL changes without altering public federation identity behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100