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({
|
2019-04-05 15:30:33 +00:00
|
|
|
"subject": `acct:blog@${domain}`,
|
2019-02-20 22:12:29 +00:00
|
|
|
"links": [
|
|
|
|
{
|
|
|
|
"rel": "self",
|
|
|
|
"type": "application/activity+json",
|
|
|
|
"href": `https://${domain}/ap/actor`
|
|
|
|
}
|
|
|
|
]
|
|
|
|
});
|
|
|
|
res.end();
|
|
|
|
});
|
|
|
|
}
|