forked from shadowfacts/shadowfacts.net
23 lines
441 B
TypeScript
23 lines
441 B
TypeScript
|
import express, { Router } from "express";
|
||
|
|
||
|
const domain = process.env.DOMAIN;
|
||
|
|
||
|
export default function webfinger(): Router {
|
||
|
const 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();
|
||
|
});
|
||
|
|
||
|
return router;
|
||
|
}
|