add basic nodeinfo 2.0
This commit is contained in:
parent
ca724dab9a
commit
0fc002b399
2 changed files with 55 additions and 0 deletions
20
src/routes/well-known/nodeinfo.ts
Normal file
20
src/routes/well-known/nodeinfo.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { RouteOptions } from "fastify";
|
||||
|
||||
import { BASE_URL } from "~/config.js";
|
||||
|
||||
const route: RouteOptions = {
|
||||
method: "GET",
|
||||
url: "/.well-known/nodeinfo",
|
||||
handler: async (_, res) => {
|
||||
res.send({
|
||||
links: [
|
||||
{
|
||||
href: `${BASE_URL}/nodeinfo/2.0`,
|
||||
rel: "http://nodeinfo.diaspora.software/ns/schema/2.0",
|
||||
},
|
||||
],
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default route;
|
Loading…
Add table
Add a link
Reference in a new issue