From ed532b51a627927e6f63ce72c4381e1f37cfbfa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Thu, 7 Mar 2019 20:11:04 +0900 Subject: [PATCH] Create robots.txt (#4439) * Create robots.txt * Update index.ts --- assets/robots.txt | 4 ++++ src/server/web/index.ts | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 assets/robots.txt diff --git a/assets/robots.txt b/assets/robots.txt new file mode 100644 index 000000000..dc17e04e3 --- /dev/null +++ b/assets/robots.txt @@ -0,0 +1,4 @@ +user-agent: * +allow: / + +# todo: sitemap diff --git a/src/server/web/index.ts b/src/server/web/index.ts index b51d6659c..f83b36437 100644 --- a/src/server/web/index.ts +++ b/src/server/web/index.ts @@ -79,6 +79,12 @@ router.get('/manifest.json', async ctx => { }); }); +router.get('/robots.txt', async ctx => { + await send(ctx as any, '/assets/robots.txt', { + root: client + }); +}); + //#endregion // Docs