From 848b9bcdf17d36c0c33e55590d532144927b98b6 Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Wed, 16 Nov 2022 17:58:55 -0500 Subject: [PATCH] backend: partially revert repo url change in nodeinfo --- packages/backend/src/server/nodeinfo.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/nodeinfo.ts b/packages/backend/src/server/nodeinfo.ts index 6cfdd3561..2411d438d 100644 --- a/packages/backend/src/server/nodeinfo.ts +++ b/packages/backend/src/server/nodeinfo.ts @@ -24,6 +24,7 @@ type NodeInfo2Base = { software: { name: string; version: string; + repository?: string; }; protocols: string[]; services: { @@ -65,6 +66,7 @@ const nodeinfo2 = async (): Promise => { software: { name: 'foundkey', version: config.version, + repository, }, protocols: ['activitypub'], services: { @@ -109,13 +111,15 @@ const nodeinfo2 = async (): Promise => { router.get(nodeinfo2_1path, async ctx => { const base = await nodeinfo2(); - ctx.body = { version: '2.1', repository, ...base }; + ctx.body = { version: '2.1', ...base }; ctx.set('Cache-Control', 'public, max-age=600'); }); router.get(nodeinfo2_0path, async ctx => { const base = await nodeinfo2(); + delete base.software.repository; + ctx.body = { version: '2.0', ...base }; ctx.set('Cache-Control', 'public, max-age=600'); });