shadowfacts.net/lib/activitypub/webfinger.ts

19 lines
396 B
TypeScript

import express, { Router } from "express";
const domain = process.env.DOMAIN;
export default function webfinger(router: Router) {
router.get("/.well-known/webfinger", (req, res) => {
res.json({
"subject": `acct:blog@${domain}`,
"links": [
{
"rel": "self",
"type": "application/activity+json",
"href": `https://${domain}/ap/actor`
}
]
});
res.end();
});
}