Changeset 5bf63b7 in Klonkt for src/routes/activitypub.js
- Timestamp:
- 06/24/2026 10:35:48 AM (3 months ago)
- Branches:
- main
- Children:
- dd1028a
- Parents:
- 6bd25d1
- File:
-
- 1 edited
-
src/routes/activitypub.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/activitypub.js
r6bd25d1 r5bf63b7 80 80 }); 81 81 82 // ── Inbox (Phase 1 stub: accept; Follow/Accept + sig verify next step) ── 83 const apJson = express.json({ type: ['application/activity+json', 'application/ld+json', 'application/json'], limit: '1mb' }); 84 router.post(['/ap/users/:slug/inbox', '/ap/inbox'], apJson, (req, res) => { 85 try { console.log('[AP inbox]', (req.body && req.body.type) || 'unknown', '→', req.params.slug || 'shared'); } catch { /* ignore */ } 86 res.status(202).end(); 82 // ── Inbox — Follow→Accept, Undo Follow (best-effort signature verify) ── 83 const apJson = express.json({ 84 type: ['application/activity+json', 'application/ld+json', 'application/json'], 85 limit: '1mb', 86 verify: (req, _res, buf) => { req.rawBody = buf; }, // raw body for digest verification 87 }); 88 router.post(['/ap/users/:slug/inbox', '/ap/inbox'], apJson, async (req, res) => { 89 try { return res.status(await AP.handleInbox(req, req.params.slug || null) || 202).end(); } 90 catch (e) { console.warn('[AP inbox] error:', e.message); return res.status(202).end(); } 87 91 }); 88 92
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)