From 06124dbbd556d73f530648b9e0a7465722a46fa3 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Mon, 26 Nov 2018 04:49:24 +0900 Subject: [PATCH] Return 404 for undefined .well-known (#3404) --- src/server/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/server/index.ts b/src/server/index.ts index 77c869bb4..e26f73ff4 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -59,6 +59,11 @@ const router = new Router(); router.use(activityPub.routes()); router.use(webFinger.routes()); +// Return 404 for other .well-known +router.all('/.well-known/*', async ctx => { + ctx.status = 404; +}); + // Register router app.use(router.routes());