Changeset 679924e in Klonkt for src/routes
- Timestamp:
- 08/02/2026 08:06:21 AM (5 weeks ago)
- Branches:
- main
- Children:
- af035e6
- Parents:
- 26c5f71
- File:
-
- 1 edited
-
src/routes/activitypub.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/activitypub.js
r26c5f71 r679924e 20 20 import OAuth from '../services/OAuthService.js'; 21 21 import * as Guardianship from '../services/guardianship/index.js'; 22 import { getPrimarySite } from '../middleware/site.js'; 22 23 import multer from 'multer'; 23 24 import path from 'path'; … … 43 44 const hostOf = (req) => { try { return new URL(baseUrl(req)).host; } catch { return req.get('host'); } }; 44 45 const publicSite = (slug) => db.prepare('SELECT * FROM sites WHERE slug = ? AND (is_public IS NULL OR is_public = 1)').get(slug); 45 const primarySlug = () => { const r = db.prepare('SELECT slug FROM sites WHERE is_primary = 1').get(); return r && r.slug; }; 46 // The primary site, via the one source of truth in middleware/site.js — which 47 // falls back to the oldest site when nothing carries the is_primary flag. This 48 // route used to keep its own is_primary-only copy, so a fresh instance whose 49 // site was never flagged served its HTML at / (that resolver falls back) while 50 // WebFinger and the actor route insisted it had no primary at all. 51 const primarySlug = () => { const s = getPrimarySite(); return s && s.slug; }; 46 52 // A hostname as a human types it and as DNS stores it are the same host: 47 53 // `🩵.is.wildenvrij.nl` IS `xn--zz9h.is.wildenvrij.nl`. WHATWG URL does the IDNA,
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)