shadowfacts.net/lib/activitypub/webfinger.ts

19 lines
403 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:shadowfacts@${domain}`,
"links": [
{
"rel": "self",
"type": "application/activity+json",
"href": `https://${domain}/ap/actor`
}
]
});
res.end();
});
}