2019-02-20 22:12:29 +00:00
|
|
|
import express, { Router } from "express";
|
|
|
|
|
|
|
|
const domain = process.env.DOMAIN;
|
|
|
|
|
2019-02-20 23:07:29 +00:00
|
|
|
export default function webfinger(router: Router) {
|
2019-02-20 22:12:29 +00:00
|
|
|
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();
|
|
|
|
});
|
|
|
|
}
|